diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2013-01-22 04:09:46 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-01-31 11:07:49 -0500 |
commit | 00c7e1f10c6b8ae8a031f5c6a58ecd15d20c52cb (patch) | |
tree | 30de74b17585dc5fa4499255d687819dfa6772f8 /tools/perf | |
parent | 01d14f1615dfe1c6d040541501445967ac716009 (diff) |
perf report: Add report.group config option
Add report.group config option for setting default value of event
group view. It affects the report output only if perf.data contains
event group info.
A user can write .perfconfig file like below to enable group view by
default:
$ cat ~/.perfconfig
[report]
group = true
And it can be disabled through command line:
$ perf report --no-group
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1358845787-1350-19-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/builtin-report.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 9ef38424f7c3..0d221870561a 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include "builtin.h" | 8 | #include "builtin.h" |
9 | 9 | ||
10 | #include "util/util.h" | 10 | #include "util/util.h" |
11 | #include "util/cache.h" | ||
11 | 12 | ||
12 | #include "util/annotate.h" | 13 | #include "util/annotate.h" |
13 | #include "util/color.h" | 14 | #include "util/color.h" |
@@ -54,6 +55,16 @@ struct perf_report { | |||
54 | DECLARE_BITMAP(cpu_bitmap, MAX_NR_CPUS); | 55 | DECLARE_BITMAP(cpu_bitmap, MAX_NR_CPUS); |
55 | }; | 56 | }; |
56 | 57 | ||
58 | static int perf_report_config(const char *var, const char *value, void *cb) | ||
59 | { | ||
60 | if (!strcmp(var, "report.group")) { | ||
61 | symbol_conf.event_group = perf_config_bool(var, value); | ||
62 | return 0; | ||
63 | } | ||
64 | |||
65 | return perf_default_config(var, value, cb); | ||
66 | } | ||
67 | |||
57 | static int perf_report__add_branch_hist_entry(struct perf_tool *tool, | 68 | static int perf_report__add_branch_hist_entry(struct perf_tool *tool, |
58 | struct addr_location *al, | 69 | struct addr_location *al, |
59 | struct perf_sample *sample, | 70 | struct perf_sample *sample, |
@@ -677,6 +688,8 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused) | |||
677 | OPT_END() | 688 | OPT_END() |
678 | }; | 689 | }; |
679 | 690 | ||
691 | perf_config(perf_report_config, NULL); | ||
692 | |||
680 | argc = parse_options(argc, argv, options, report_usage, 0); | 693 | argc = parse_options(argc, argv, options, report_usage, 0); |
681 | 694 | ||
682 | if (report.use_stdio) | 695 | if (report.use_stdio) |