diff options
author | Namhyung Kim <namhyung@kernel.org> | 2014-01-14 12:02:15 +0900 |
---|---|---|
committer | Jiri Olsa <jolsa@redhat.com> | 2014-04-16 17:16:04 +0200 |
commit | 0b93da1756df4fe930ee0220a6addce263a6e0ab (patch) | |
tree | 2af9abbfd073bb6b84a5e03bcac41b8e1eabe22a /tools/perf/util/hist.c | |
parent | 8810f6ced73556c1a63b6269a6cdad8d630aaaf0 (diff) | |
download | linux-0b93da1756df4fe930ee0220a6addce263a6e0ab.tar.gz linux-0b93da1756df4fe930ee0220a6addce263a6e0ab.tar.bz2 linux-0b93da1756df4fe930ee0220a6addce263a6e0ab.zip |
perf tools: Add hist.percentage config option
Add hist.percentage option for setting default value of the
symbol_conf.filter_relative. It affects the output of various perf
commands (like perf report, top and diff) only if filter(s) applied.
An user can write .perfconfig file like below to show absolute
percentage of filtered entries by default:
$ cat ~/.perfconfig
[hist]
percentage = absolute
And it can be changed through command line:
$ perf report --percentage relative
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1397145720-8063-6-git-send-email-namhyung@kernel.org
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r-- | tools/perf/util/hist.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 3c2dd233b98e..5a892477aa50 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -956,3 +956,11 @@ int parse_filter_percentage(const struct option *opt __maybe_unused, return 0; } + +int perf_hist_config(const char *var, const char *value) +{ + if (!strcmp(var, "hist.percentage")) + return parse_filter_percentage(NULL, value, 0); + + return 0; +} |