perf script: Make printing of dso a separate field option
The 'sym' option displays both the function name and the DSO it comes from. Split the display of the dso into a separate option. This allows display of the ip address and symbol without the dso, thus shortening line lengths - and decluttering the output a bit. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1306528124-25861-3-git-send-email-dsahern@gmail.com Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
787bef174f
commit
610723f24e
@ -1205,7 +1205,7 @@ struct perf_evsel *perf_session__find_first_evtype(struct perf_session *session,
|
||||
void perf_session__print_ip(union perf_event *event,
|
||||
struct perf_sample *sample,
|
||||
struct perf_session *session,
|
||||
int print_sym)
|
||||
int print_sym, int print_dso)
|
||||
{
|
||||
struct addr_location al;
|
||||
const char *symname, *dsoname;
|
||||
@ -1241,12 +1241,15 @@ void perf_session__print_ip(union perf_event *event,
|
||||
else
|
||||
symname = "";
|
||||
|
||||
printf(" %s", symname);
|
||||
}
|
||||
if (print_dso) {
|
||||
if (node->map && node->map->dso && node->map->dso->name)
|
||||
dsoname = node->map->dso->name;
|
||||
else
|
||||
dsoname = "";
|
||||
|
||||
printf(" %s (%s)", symname, dsoname);
|
||||
printf(" (%s)", dsoname);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
@ -1261,12 +1264,16 @@ void perf_session__print_ip(union perf_event *event,
|
||||
else
|
||||
symname = "";
|
||||
|
||||
printf(" %s", symname);
|
||||
}
|
||||
|
||||
if (print_dso) {
|
||||
if (al.map && al.map->dso && al.map->dso->name)
|
||||
dsoname = al.map->dso->name;
|
||||
else
|
||||
dsoname = "";
|
||||
|
||||
printf(" %s (%s)", symname, dsoname);
|
||||
printf(" (%s)", dsoname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user