diff options
author | Jiri Olsa <jolsa@redhat.com> | 2013-06-10 02:21:21 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-07-08 16:38:53 -0400 |
commit | 0276c22a3f22b7f6696fa07b0a77635726b2c0fd (patch) | |
tree | 4233ab9a93c8f901ad2d78a4e6dba7d59b262ec1 /tools | |
parent | bcf3145fbeb1bd91ad2ca67b1946077530f7bfb1 (diff) |
perf tools: Fix -x/--exclude-other option for report command
Currently we have symbol_conf.exclude_other being set as true every time
so the -x/--exclude-other has nothing to do.
Also we have no way to see the data with symbol_conf.exclude_other being
false which is useful sometimes.
Fixing it by making symbol_conf.exclude_other false by default.
1) Example without -x option:
$ perf report -i perf.data.delete -p perf_session__delete -s parent
+ 99.91% [other]
+ 0.08% perf_session__delete
+ 0.00% perf_session__delete_dead_threads
+ 0.00% perf_session__delete_threads
2) Example with -x option:
$ ./perf report -i perf.data.delete -p perf_session__delete -s parent -x
+ 96.22% perf_session__delete
+ 1.89% perf_session__delete_dead_threads
+ 1.89% perf_session__delete_threads
In Example 1) we get the sorted out data together with the rest
"[other]". This could help us estimate how much time we spent in the
sorted data.
In Example 2) the total is just the sorted data.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-sg8fvu0fyqohf9ur9l38lhkw@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-diff.c | 1 | ||||
-rw-r--r-- | tools/perf/builtin-report.c | 3 | ||||
-rw-r--r-- | tools/perf/builtin-top.c | 2 | ||||
-rw-r--r-- | tools/perf/util/symbol.c | 1 |
4 files changed, 1 insertions, 6 deletions
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index da8f8eb383a0..0aac5f3e594d 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/builtin-diff.c | |||
@@ -607,7 +607,6 @@ int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused) | |||
607 | input_new = "perf.data.guest"; | 607 | input_new = "perf.data.guest"; |
608 | } | 608 | } |
609 | 609 | ||
610 | symbol_conf.exclude_other = false; | ||
611 | if (symbol__init() < 0) | 610 | if (symbol__init() < 0) |
612 | return -1; | 611 | return -1; |
613 | 612 | ||
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index ca98d34cd58b..3662047cc6b1 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -939,8 +939,7 @@ repeat: | |||
939 | */ | 939 | */ |
940 | if (!strstr(sort_order, "parent")) | 940 | if (!strstr(sort_order, "parent")) |
941 | sort_parent.elide = 1; | 941 | sort_parent.elide = 1; |
942 | } else | 942 | } |
943 | symbol_conf.exclude_other = false; | ||
944 | 943 | ||
945 | if (argc) { | 944 | if (argc) { |
946 | /* | 945 | /* |
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index f036af9b6f09..e06c4f869330 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -1130,8 +1130,6 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused) | |||
1130 | if (top.evlist == NULL) | 1130 | if (top.evlist == NULL) |
1131 | return -ENOMEM; | 1131 | return -ENOMEM; |
1132 | 1132 | ||
1133 | symbol_conf.exclude_other = false; | ||
1134 | |||
1135 | argc = parse_options(argc, argv, options, top_usage, 0); | 1133 | argc = parse_options(argc, argv, options, top_usage, 0); |
1136 | if (argc) | 1134 | if (argc) |
1137 | usage_with_options(top_usage, options); | 1135 | usage_with_options(top_usage, options); |
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 8cf3b5426a9a..d5528e1cc03a 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -32,7 +32,6 @@ int vmlinux_path__nr_entries; | |||
32 | char **vmlinux_path; | 32 | char **vmlinux_path; |
33 | 33 | ||
34 | struct symbol_conf symbol_conf = { | 34 | struct symbol_conf symbol_conf = { |
35 | .exclude_other = true, | ||
36 | .use_modules = true, | 35 | .use_modules = true, |
37 | .try_vmlinux_path = true, | 36 | .try_vmlinux_path = true, |
38 | .annotate_src = true, | 37 | .annotate_src = true, |