diff options
author | David Ahern <dsahern@gmail.com> | 2011-05-27 20:28:44 (GMT) |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-06-02 16:29:14 (GMT) |
commit | 610723f24eeb842025178a6722fa9108c4e157b6 (patch) | |
tree | e184c3b2242ba9b9da065221d4673603dd9d8e86 /tools/perf/util | |
parent | 787bef174f055343c69a9639e6e05a564980ed4c (diff) | |
download | linux-fsl-qoriq-610723f24eeb842025178a6722fa9108c4e157b6.tar.xz |
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')
-rw-r--r-- | tools/perf/util/session.c | 13 | ||||
-rw-r--r-- | tools/perf/util/session.h | 2 |
2 files changed, 11 insertions, 4 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index ad33650..0dd4182 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); } } } diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h index d76af0f..de4178d 100644 --- a/tools/perf/util/session.h +++ b/tools/perf/util/session.h @@ -170,6 +170,6 @@ 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); #endif /* __PERF_SESSION_H */ |