summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-report.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2014-02-07 12:06:07 +0900
committerJiri Olsa <jolsa@redhat.com>2014-04-16 17:16:03 +0200
commit33db4568e1f41efe6d0e4695483f968fc1135bf3 (patch)
tree864186165ad27a133c773d36dd83b20cf5a19abc /tools/perf/builtin-report.c
parentf2148330544a697481219b5bc34261f6dd049bfb (diff)
downloadop-kernel-dev-33db4568e1f41efe6d0e4695483f968fc1135bf3.zip
op-kernel-dev-33db4568e1f41efe6d0e4695483f968fc1135bf3.tar.gz
perf top: Add --percentage option
The --percentage option is for controlling overhead percentage displayed. It can only receive either of "relative" or "absolute". Move the parser callback function into a common location since it's used by multiple commands now. For more information, please see previous commit same thing done to "perf report". Signed-off-by: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/r/1397145720-8063-4-git-send-email-namhyung@kernel.org Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r--tools/perf/builtin-report.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 7ec351b..af8cb7a 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -717,20 +717,6 @@ parse_percent_limit(const struct option *opt, const char *str,
return 0;
}
-static int
-parse_percentage(const struct option *opt __maybe_unused, const char *str,
- int unset __maybe_unused)
-{
- if (!strcmp(str, "relative"))
- symbol_conf.filter_relative = true;
- else if (!strcmp(str, "absolute"))
- symbol_conf.filter_relative = false;
- else
- return -1;
-
- return 0;
-}
-
int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
{
struct perf_session *session;
@@ -854,7 +840,7 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
OPT_CALLBACK(0, "percent-limit", &report, "percent",
"Don't show entries under that percent", parse_percent_limit),
OPT_CALLBACK(0, "percentage", NULL, "relative|absolute",
- "how to display percentage of filtered entries", parse_percentage),
+ "how to display percentage of filtered entries", parse_filter_percentage),
OPT_END()
};
struct perf_data_file file = {
OpenPOWER on IntegriCloud