perf tools: Fix -x/--exclude-other option for report command
authorJiri Olsa <jolsa@redhat.com>
Mon, 10 Jun 2013 06:21:21 +0000 (08:21 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 8 Jul 2013 20:38:53 +0000 (17:38 -0300)
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>
tools/perf/builtin-diff.c
tools/perf/builtin-report.c
tools/perf/builtin-top.c
tools/perf/util/symbol.c

index da8f8eb383a0bea2b7ddefe923836969acbd65fe..0aac5f3e594d87674af00d9a5ef6172d05c16baf 100644 (file)
@@ -607,7 +607,6 @@ int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused)
                input_new = "perf.data.guest";
        }
 
-       symbol_conf.exclude_other = false;
        if (symbol__init() < 0)
                return -1;
 
index ca98d34cd58b533491a255c8349795f581afce17..3662047cc6b1bcd881c8ca833988b2007cc66869 100644 (file)
@@ -939,8 +939,7 @@ repeat:
                 */
                if (!strstr(sort_order, "parent"))
                        sort_parent.elide = 1;
-       } else
-               symbol_conf.exclude_other = false;
+       }
 
        if (argc) {
                /*
index f036af9b6f09f00e52debecafe09a1c930d3ad12..e06c4f8693306827df06134a765d615ce27ae1cc 100644 (file)
@@ -1130,8 +1130,6 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
        if (top.evlist == NULL)
                return -ENOMEM;
 
-       symbol_conf.exclude_other = false;
-
        argc = parse_options(argc, argv, options, top_usage, 0);
        if (argc)
                usage_with_options(top_usage, options);
index 8cf3b5426a9aa9ddab8021bbdda944dec3c5e136..d5528e1cc03a0d72a3676597897bdfd6bb6a811e 100644 (file)
@@ -32,7 +32,6 @@ int vmlinux_path__nr_entries;
 char **vmlinux_path;
 
 struct symbol_conf symbol_conf = {
-       .exclude_other    = true,
        .use_modules      = true,
        .try_vmlinux_path = true,
        .annotate_src     = true,