summaryrefslogtreecommitdiffstats
path: root/tools/perf/tests
diff options
context:
space:
mode:
authorHendrik Brueckner <brueckner@linux.ibm.com>2018-04-13 09:42:23 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-04-26 18:47:07 +0200
commitea40b6d3222e5feef178d9b49baead28e9b5fe20 (patch)
treebbf485d15709b5298187c938c10c91533bd8af24 /tools/perf/tests
parentperf thread: Introduce thread__find_map() (diff)
downloadlinux-ea40b6d3222e5feef178d9b49baead28e9b5fe20.tar.xz
linux-ea40b6d3222e5feef178d9b49baead28e9b5fe20.zip
perf tests: Let 'perf test list' display subtests
The output of perf test and perf test list differ because perf test list does not display subtests. Correct this behavior and also let perf test list report subtests. For example: $ ./perf test 2>&1 |wc -l 65 Without this commit: $ ./perf test list 2>&1 |wc -l 57 With this commit: $ ./perf test list 2>&1 |wc -l 65 Signed-off-by: Hendrik Brueckner <brueckner@linux.ibm.com> Reviewed-by: Thomas Richter <tmricht@linux.ibm.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Michael Petlan <mpetlan@redhat.com> Cc: linux-s390@vger.kernel.org LPU-Reference: 1523605343-11970-1-git-send-email-brueckner@linux.ibm.com Link: https://lkml.kernel.org/n/tip-efb74jw7x2xs2bucp5hf4ilu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests')
-rw-r--r--tools/perf/tests/builtin-test.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
index cac8f8889bc3..2bde505e2e7e 100644
--- a/tools/perf/tests/builtin-test.c
+++ b/tools/perf/tests/builtin-test.c
@@ -654,6 +654,15 @@ static int perf_test__list(int argc, const char **argv)
continue;
pr_info("%2d: %s\n", i, t->desc);
+
+ if (t->subtest.get_nr) {
+ int subn = t->subtest.get_nr();
+ int subi;
+
+ for (subi = 0; subi < subn; subi++)
+ pr_info("%2d:%1d: %s\n", i, subi + 1,
+ t->subtest.get_desc(subi));
+ }
}
perf_test__list_shell(argc, argv, i);