mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-20 11:13:58 +08:00
perf evsel: Skip ignored symbols while printing callchain
Allows a command to have a symbol_filter controlled by the user to skip certain functions in a backtrace. One example is to allow the user to reduce repeating patterns like: do_select core_sys_select sys_select to just sys_select when dumping callchains, consuming less real estate on the screen while still conveying the essential message - the process is in a select call. This option is leveraged by the upcoming timehist command. Signed-off-by: David Ahern <dsahern@gmail.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1384806771-2945-2-git-send-email-dsahern@gmail.com [ Checked if al.sym is NULL before touching al.sym->ignored, as noted by Adrian Hunter ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
6f8d67fa0c
commit
d2ff1b1499
@ -1522,6 +1522,9 @@ void perf_evsel__print_ip(struct perf_evsel *evsel, union perf_event *event,
|
|||||||
if (!node)
|
if (!node)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (node->sym && node->sym->ignore)
|
||||||
|
goto next;
|
||||||
|
|
||||||
if (print_ip)
|
if (print_ip)
|
||||||
printf("%c%16" PRIx64, s, node->ip);
|
printf("%c%16" PRIx64, s, node->ip);
|
||||||
|
|
||||||
@ -1544,12 +1547,15 @@ void perf_evsel__print_ip(struct perf_evsel *evsel, union perf_event *event,
|
|||||||
if (!print_oneline)
|
if (!print_oneline)
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
callchain_cursor_advance(&callchain_cursor);
|
|
||||||
|
|
||||||
stack_depth--;
|
stack_depth--;
|
||||||
|
next:
|
||||||
|
callchain_cursor_advance(&callchain_cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
if (al.sym && al.sym->ignore)
|
||||||
|
return;
|
||||||
|
|
||||||
if (print_ip)
|
if (print_ip)
|
||||||
printf("%16" PRIx64, sample->ip);
|
printf("%16" PRIx64, sample->ip);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user