[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170814162741.6101-7-acme@kernel.org>
Date: Mon, 14 Aug 2017 13:27:28 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Ingo Molnar <mingo@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Adrian Hunter <adrian.hunter@...el.com>,
David Ahern <dsahern@...il.com>, Jiri Olsa <jolsa@...nel.org>,
Matt Fleming <matt.fleming@...el.com>,
Michael Petlan <mpetlan@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Thomas Richter <tmricht@...ux.vnet.ibm.com>,
Wang Nan <wangnan0@...wei.com>
Subject: [PATCH 06/19] perf test: Make 'list' subcommand match main 'perf test' numbering/matching
From: Arnaldo Carvalho de Melo <acme@...hat.com>
Before:
# perf test Synth
39: Synthesize thread map : Ok
41: Synthesize cpu map : Ok
42: Synthesize stat config : Ok
43: Synthesize stat : Ok
44: Synthesize stat round : Ok
45: Synthesize attr update : Ok
#
# perf test list Synth
1: Synthesize thread map
2: Synthesize cpu map
3: Synthesize stat config
4: Synthesize stat
5: Synthesize stat round
6: Synthesize attr update
#
After:
# perf test Synth
39: Synthesize thread map : Ok
41: Synthesize cpu map : Ok
42: Synthesize stat config : Ok
43: Synthesize stat : Ok
44: Synthesize stat round : Ok
45: Synthesize attr update : Ok
#
# perf test list Synth
39: Synthesize thread map
41: Synthesize cpu map
42: Synthesize stat config
43: Synthesize stat
44: Synthesize stat round
45: Synthesize attr update
#
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Matt Fleming <matt.fleming@...el.com>
Cc: Michael Petlan <mpetlan@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Thomas Richter <tmricht@...ux.vnet.ibm.com>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/n/tip-pjhuhkphs7o3tkbqrukfv6bz@git.kernel.org
Fixes: e8210cefb7e1 ("perf tests: Introduce iterator function for tests")
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/tests/builtin-test.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
index 3ccfd58a8c3c..436e22993909 100644
--- a/tools/perf/tests/builtin-test.c
+++ b/tools/perf/tests/builtin-test.c
@@ -465,10 +465,12 @@ static int perf_test__list(int argc, const char **argv)
int i = 0;
for_each_test(j, t) {
+ ++i;
+
if (argc > 1 && !strstr(t->desc, argv[1]))
continue;
- pr_info("%2d: %s\n", ++i, t->desc);
+ pr_info("%2d: %s\n", i, t->desc);
}
return 0;
--
2.13.4
Powered by blists - more mailing lists