diff options
author | David Ahern <dsahern@gmail.com> | 2011-05-27 14:28:44 -0600 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-06-02 13:29:14 -0300 |
commit | 610723f24eeb842025178a6722fa9108c4e157b6 (patch) | |
tree | e184c3b2242ba9b9da065221d4673603dd9d8e86 /tools/perf/util/session.c | |
parent | 787bef174f055343c69a9639e6e05a564980ed4c (diff) | |
download | talos-obmc-linux-610723f24eeb842025178a6722fa9108c4e157b6.tar.gz talos-obmc-linux-610723f24eeb842025178a6722fa9108c4e157b6.zip |
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>
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r-- | tools/perf/util/session.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index ad33650cdd41..0dd418299261 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -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); } } } |