diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-report.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index aebba5659345..1e2f5dde312c 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -40,6 +40,7 @@ static int dump_trace = 0; | |||
40 | 40 | ||
41 | static int verbose; | 41 | static int verbose; |
42 | static int full_paths; | 42 | static int full_paths; |
43 | static int collapse_syscalls; | ||
43 | 44 | ||
44 | static unsigned long page_size; | 45 | static unsigned long page_size; |
45 | static unsigned long mmap_window = 32; | 46 | static unsigned long mmap_window = 32; |
@@ -983,6 +984,15 @@ process_overflow_event(event_t *event, unsigned long offset, unsigned long head) | |||
983 | for (i = 0; i < chain->nr; i++) | 984 | for (i = 0; i < chain->nr; i++) |
984 | dprintf("..... %2d: %p\n", i, (void *)chain->ips[i]); | 985 | dprintf("..... %2d: %p\n", i, (void *)chain->ips[i]); |
985 | } | 986 | } |
987 | if (collapse_syscalls) { | ||
988 | /* | ||
989 | * Find the all-but-last kernel entry | ||
990 | * amongst the call-chains - to get | ||
991 | * to the level of system calls: | ||
992 | */ | ||
993 | if (chain->kernel >= 2) | ||
994 | ip = chain->ips[chain->kernel-2]; | ||
995 | } | ||
986 | } | 996 | } |
987 | 997 | ||
988 | dprintf(" ... thread: %s:%d\n", thread->comm, thread->pid); | 998 | dprintf(" ... thread: %s:%d\n", thread->comm, thread->pid); |
@@ -1343,6 +1353,8 @@ static const struct option options[] = { | |||
1343 | "sort by key(s): pid, comm, dso, symbol. Default: pid,symbol"), | 1353 | "sort by key(s): pid, comm, dso, symbol. Default: pid,symbol"), |
1344 | OPT_BOOLEAN('P', "full-paths", &full_paths, | 1354 | OPT_BOOLEAN('P', "full-paths", &full_paths, |
1345 | "Don't shorten the pathnames taking into account the cwd"), | 1355 | "Don't shorten the pathnames taking into account the cwd"), |
1356 | OPT_BOOLEAN('S', "syscalls", &collapse_syscalls, | ||
1357 | "show per syscall summary overhead, using call graph"), | ||
1346 | OPT_END() | 1358 | OPT_END() |
1347 | }; | 1359 | }; |
1348 | 1360 | ||