Messages in this thread Patch in this message | | | From | Namhyung Kim <> | Subject | [PATCH 4/5] perf report: Add report.percentage config option | Date | Tue, 14 Jan 2014 13:43:18 +0900 |
| |
Add report.percentage option for setting default value of the symbol_conf.filter_relative. It affects the report output only if a filter applied.
An user can write .perfconfig file like below to show absolute percentage of filtered entries by default:
$ cat ~/.perfconfig [report] percentage = absolute
And it can be changed through command line:
$ perf report --percentage relative
Signed-off-by: Namhyung Kim <namhyung@kernel.org> --- tools/perf/builtin-report.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 535bd6745355..1bb9e989c7bd 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -71,6 +71,16 @@ static int report__config(const char *var, const char *value, void *cb) rep->min_percent = strtof(value, NULL); return 0; } + if (!strcmp(var, "report.percentage")) { + if (!strcmp(value, "relative")) + symbol_conf.filter_relative = true; + else if (!strcmp(value, "absolute")) + symbol_conf.filter_relative = false; + else + return -1; + + return 0; + } return perf_default_config(var, value, cb); } -- 1.7.11.7
| |