* [PATCH 0/2] perf trace: Two trivial fixes
@ 2018-01-30 5:30 Ravi Bangoria
2018-01-30 5:30 ` [PATCH 1/2] perf tools: Add trace/beauty/generated/ into .gitignore Ravi Bangoria
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Ravi Bangoria @ 2018-01-30 5:30 UTC (permalink / raw)
To: acme; +Cc: alexander.shishkin, jolsa, namhyung, linux-kernel, Ravi Bangoria
Two independent fixes:
First adds 'generated' directory into .gitignore
Second fixes call-graph output with perf trace
Ravi Bangoria (2):
perf tools: Add trace/beauty/generated/ into .gitignore
perf trace: Fix call-graph output
tools/perf/.gitignore | 1 +
tools/perf/builtin-trace.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 1/2] perf tools: Add trace/beauty/generated/ into .gitignore 2018-01-30 5:30 [PATCH 0/2] perf trace: Two trivial fixes Ravi Bangoria @ 2018-01-30 5:30 ` Ravi Bangoria 2018-02-05 21:37 ` [tip:perf/urgent] " tip-bot for Ravi Bangoria 2018-01-30 5:30 ` [PATCH 2/2] perf trace: Fix call-graph output Ravi Bangoria 2018-02-05 16:58 ` [PATCH 0/2] perf trace: Two trivial fixes Arnaldo Carvalho de Melo 2 siblings, 1 reply; 6+ messages in thread From: Ravi Bangoria @ 2018-01-30 5:30 UTC (permalink / raw) To: acme; +Cc: alexander.shishkin, jolsa, namhyung, linux-kernel, Ravi Bangoria No functionality changes. Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> --- tools/perf/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/.gitignore b/tools/perf/.gitignore index 643cc4ba..3e5135d 100644 --- a/tools/perf/.gitignore +++ b/tools/perf/.gitignore @@ -31,5 +31,6 @@ config.mak.autogen .config-detected util/intel-pt-decoder/inat-tables.c arch/*/include/generated/ +trace/beauty/generated/ pmu-events/pmu-events.c pmu-events/jevents -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [tip:perf/urgent] perf tools: Add trace/beauty/generated/ into .gitignore 2018-01-30 5:30 ` [PATCH 1/2] perf tools: Add trace/beauty/generated/ into .gitignore Ravi Bangoria @ 2018-02-05 21:37 ` tip-bot for Ravi Bangoria 0 siblings, 0 replies; 6+ messages in thread From: tip-bot for Ravi Bangoria @ 2018-02-05 21:37 UTC (permalink / raw) To: linux-tip-commits Cc: mingo, tglx, linux-kernel, hpa, namhyung, acme, alexander.shishkin, ravi.bangoria, jolsa Commit-ID: 2fe2230d4183d2c311bbb7b426491ac486216a16 Gitweb: https://git.kernel.org/tip/2fe2230d4183d2c311bbb7b426491ac486216a16 Author: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> AuthorDate: Tue, 30 Jan 2018 11:00:52 +0530 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitDate: Mon, 5 Feb 2018 13:58:02 -0300 perf tools: Add trace/beauty/generated/ into .gitignore No functionality changes. Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/r/20180130053053.13214-2-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/.gitignore b/tools/perf/.gitignore index 643cc4ba..3e5135d 100644 --- a/tools/perf/.gitignore +++ b/tools/perf/.gitignore @@ -31,5 +31,6 @@ config.mak.autogen .config-detected util/intel-pt-decoder/inat-tables.c arch/*/include/generated/ +trace/beauty/generated/ pmu-events/pmu-events.c pmu-events/jevents ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] perf trace: Fix call-graph output 2018-01-30 5:30 [PATCH 0/2] perf trace: Two trivial fixes Ravi Bangoria 2018-01-30 5:30 ` [PATCH 1/2] perf tools: Add trace/beauty/generated/ into .gitignore Ravi Bangoria @ 2018-01-30 5:30 ` Ravi Bangoria 2018-02-05 21:37 ` [tip:perf/urgent] " tip-bot for Ravi Bangoria 2018-02-05 16:58 ` [PATCH 0/2] perf trace: Two trivial fixes Arnaldo Carvalho de Melo 2 siblings, 1 reply; 6+ messages in thread From: Ravi Bangoria @ 2018-01-30 5:30 UTC (permalink / raw) To: acme; +Cc: alexander.shishkin, jolsa, namhyung, linux-kernel, Ravi Bangoria Recently, Arnaldo fixed global vs event specific --max-stack usage with commit bd3dda9ab0fb ("perf trace: Allow overriding global --max-stack per event"). This commit is having a regression when we don't use --max-stack at all with perf trace. Ex, $ ./perf trace record -g ls $ ./perf trace -i perf.data 0.076 ( 0.002 ms): ls/9109 brk( 0.196 ( 0.008 ms): ls/9109 access(filename: 0x9f998b70, mode: R 0.209 ( 0.031 ms): ls/9109 open(filename: 0x9f998978, flags: CLOEXEC This is missing call-traces. After patch: $ ./perf trace -i perf.data 0.076 ( 0.002 ms): ls/9109 brk( do_syscall_trace_leave ([kernel.kallsyms]) [0] ([unknown]) syscall_exit_work ([kernel.kallsyms]) brk (/usr/lib64/ld-2.17.so) _dl_sysdep_start (/usr/lib64/ld-2.17.so) _dl_start_final (/usr/lib64/ld-2.17.so) _dl_start (/usr/lib64/ld-2.17.so) _start (/usr/lib64/ld-2.17.so) 0.196 ( 0.008 ms): ls/9109 access(filename: 0x9f998b70, mode: R do_syscall_trace_leave ([kernel.kallsyms]) [0] ([unknown]) Fixes: bd3dda9ab0fb ("perf trace: Allow overriding global --max-stack per event") Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> --- tools/perf/builtin-trace.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 17d11de..e90f5c3 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -1661,9 +1661,12 @@ static int trace__resolve_callchain(struct trace *trace, struct perf_evsel *evse struct callchain_cursor *cursor) { struct addr_location al; + int max_stack = evsel->attr.sample_max_stack ? + evsel->attr.sample_max_stack : + trace->max_stack; if (machine__resolve(trace->host, &al, sample) < 0 || - thread__resolve_callchain(al.thread, cursor, evsel, sample, NULL, NULL, evsel->attr.sample_max_stack)) + thread__resolve_callchain(al.thread, cursor, evsel, sample, NULL, NULL, max_stack)) return -1; return 0; -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [tip:perf/urgent] perf trace: Fix call-graph output 2018-01-30 5:30 ` [PATCH 2/2] perf trace: Fix call-graph output Ravi Bangoria @ 2018-02-05 21:37 ` tip-bot for Ravi Bangoria 0 siblings, 0 replies; 6+ messages in thread From: tip-bot for Ravi Bangoria @ 2018-02-05 21:37 UTC (permalink / raw) To: linux-tip-commits Cc: alexander.shishkin, ravi.bangoria, tglx, jolsa, namhyung, hpa, mingo, acme, linux-kernel Commit-ID: 3a9e9a47092e302f3c75ababebfc16e196400a93 Gitweb: https://git.kernel.org/tip/3a9e9a47092e302f3c75ababebfc16e196400a93 Author: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> AuthorDate: Tue, 30 Jan 2018 11:00:53 +0530 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitDate: Mon, 5 Feb 2018 13:53:45 -0300 perf trace: Fix call-graph output Recently, Arnaldo fixed global vs event specific --max-stack usage with commit bd3dda9ab0fb ("perf trace: Allow overriding global --max-stack per event"). This commit is having a regression when we don't use --max-stack at all with perf trace. Ex, $ ./perf trace record -g ls $ ./perf trace -i perf.data 0.076 ( 0.002 ms): ls/9109 brk( 0.196 ( 0.008 ms): ls/9109 access(filename: 0x9f998b70, mode: R 0.209 ( 0.031 ms): ls/9109 open(filename: 0x9f998978, flags: CLOEXEC This is missing call-traces. After patch: $ ./perf trace -i perf.data 0.076 ( 0.002 ms): ls/9109 brk( do_syscall_trace_leave ([kernel.kallsyms]) [0] ([unknown]) syscall_exit_work ([kernel.kallsyms]) brk (/usr/lib64/ld-2.17.so) _dl_sysdep_start (/usr/lib64/ld-2.17.so) _dl_start_final (/usr/lib64/ld-2.17.so) _dl_start (/usr/lib64/ld-2.17.so) _start (/usr/lib64/ld-2.17.so) 0.196 ( 0.008 ms): ls/9109 access(filename: 0x9f998b70, mode: R do_syscall_trace_leave ([kernel.kallsyms]) [0] ([unknown]) Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Fixes: bd3dda9ab0fb ("perf trace: Allow overriding global --max-stack per event") Link: http://lkml.kernel.org/r/20180130053053.13214-3-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/builtin-trace.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 17d11de..e7f1b18 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -1661,9 +1661,12 @@ static int trace__resolve_callchain(struct trace *trace, struct perf_evsel *evse struct callchain_cursor *cursor) { struct addr_location al; + int max_stack = evsel->attr.sample_max_stack ? + evsel->attr.sample_max_stack : + trace->max_stack; if (machine__resolve(trace->host, &al, sample) < 0 || - thread__resolve_callchain(al.thread, cursor, evsel, sample, NULL, NULL, evsel->attr.sample_max_stack)) + thread__resolve_callchain(al.thread, cursor, evsel, sample, NULL, NULL, max_stack)) return -1; return 0; ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] perf trace: Two trivial fixes 2018-01-30 5:30 [PATCH 0/2] perf trace: Two trivial fixes Ravi Bangoria 2018-01-30 5:30 ` [PATCH 1/2] perf tools: Add trace/beauty/generated/ into .gitignore Ravi Bangoria 2018-01-30 5:30 ` [PATCH 2/2] perf trace: Fix call-graph output Ravi Bangoria @ 2018-02-05 16:58 ` Arnaldo Carvalho de Melo 2 siblings, 0 replies; 6+ messages in thread From: Arnaldo Carvalho de Melo @ 2018-02-05 16:58 UTC (permalink / raw) To: Ravi Bangoria; +Cc: alexander.shishkin, jolsa, namhyung, linux-kernel Em Tue, Jan 30, 2018 at 11:00:51AM +0530, Ravi Bangoria escreveu: > Two independent fixes: > First adds 'generated' directory into .gitignore > Second fixes call-graph output with perf trace > > Ravi Bangoria (2): > perf tools: Add trace/beauty/generated/ into .gitignore > perf trace: Fix call-graph output > Thanks, applied both to perf/urgent. - Arnaldo ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-02-05 21:39 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-01-30 5:30 [PATCH 0/2] perf trace: Two trivial fixes Ravi Bangoria 2018-01-30 5:30 ` [PATCH 1/2] perf tools: Add trace/beauty/generated/ into .gitignore Ravi Bangoria 2018-02-05 21:37 ` [tip:perf/urgent] " tip-bot for Ravi Bangoria 2018-01-30 5:30 ` [PATCH 2/2] perf trace: Fix call-graph output Ravi Bangoria 2018-02-05 21:37 ` [tip:perf/urgent] " tip-bot for Ravi Bangoria 2018-02-05 16:58 ` [PATCH 0/2] perf trace: Two trivial fixes Arnaldo Carvalho de Melo
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.