[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1368497347-9628-10-git-send-email-namhyung@kernel.org>
Date: Tue, 14 May 2013 11:09:07 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>,
Ingo Molnar <mingo@...nel.org>,
Namhyung Kim <namhyung.kim@....com>,
LKML <linux-kernel@...r.kernel.org>,
Jiri Olsa <jolsa@...hat.com>, David Ahern <dsahern@...il.com>,
Stephane Eranian <eranian@...gle.com>,
Andi Kleen <andi@...stfloor.org>,
Pekka Enberg <penberg@...nel.org>
Subject: [PATCH 9/9] perf top: Reuse report.percent-limit config variable
From: Namhyung Kim <namhyung.kim@....com>
Make the config variable also works for perf top.
Cc: Andi Kleen <andi@...stfloor.org>
Cc: Pekka Enberg <penberg@...nel.org>
Signed-off-by: Namhyung Kim <namhyung@...nel.org>
---
tools/perf/builtin-top.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index f036af9b6f09..73fd40da47ba 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1032,6 +1032,19 @@ parse_percent_limit(const struct option *opt, const char *arg,
return 0;
}
+static int perf_top_config(const char *var, const char *value, void *cb)
+{
+ /* share report config variables */
+ if (!strcmp(var, "report.percent-limit")) {
+ struct perf_top *top = cb;
+
+ top->min_percent = strtof(value, NULL);
+ return 0;
+ }
+
+ return perf_default_config(var, value, cb);
+}
+
int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
{
int status;
@@ -1132,6 +1145,8 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
symbol_conf.exclude_other = false;
+ perf_config(perf_top_config, &top);
+
argc = parse_options(argc, argv, options, top_usage, 0);
if (argc)
usage_with_options(top_usage, options);
--
1.7.11.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists