From: tip-bot for Hendrik Brueckner <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mpetlan@redhat.com, linux-kernel@vger.kernel.org,
mingo@kernel.org, brueckner@linux.ibm.com, hpa@zytor.com,
acme@redhat.com, tglx@linutronix.de, jolsa@kernel.org,
tmricht@linux.ibm.com
Subject: [tip:perf/core] perf tests: Let 'perf test list' display subtests
Date: Wed, 2 May 2018 10:45:35 -0700 [thread overview]
Message-ID: <tip-efb74jw7x2xs2bucp5hf4ilu@git.kernel.org> (raw)
Commit-ID: ea40b6d3222e5feef178d9b49baead28e9b5fe20
Gitweb: https://git.kernel.org/tip/ea40b6d3222e5feef178d9b49baead28e9b5fe20
Author: Hendrik Brueckner <brueckner@linux.ibm.com>
AuthorDate: Fri, 13 Apr 2018 09:42:23 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 26 Apr 2018 13:47:07 -0300
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>
---
tools/perf/tests/builtin-test.c | 9 +++++++++
1 file changed, 9 insertions(+)
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);
reply other threads:[~2018-05-02 17:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-efb74jw7x2xs2bucp5hf4ilu@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=brueckner@linux.ibm.com \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mpetlan@redhat.com \
--cc=tglx@linutronix.de \
--cc=tmricht@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox