[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190919204306.12598-5-kim.phillips@amd.com>
Date: Thu, 19 Sep 2019 15:43:06 -0500
From: Kim Phillips <kim.phillips@....com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
CC: <kim.phillips@....com>,
Janakarajan Natarajan <Janakarajan.Natarajan@....com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Andi Kleen <ak@...ux.intel.com>,
"Jiri Olsa" <jolsa@...hat.com>, Namhyung Kim <namhyung@...nel.org>,
Borislav Petkov <bp@...e.de>, Martin Liska <mliska@...e.cz>,
Luke Mujica <lukemujica@...gle.com>,
Jin Yao <yao.jin@...ux.intel.com>,
Kan Liang <kan.liang@...ux.intel.com>,
<linux-kernel@...r.kernel.org>, <linux-perf-users@...r.kernel.org>
Subject: [PATCH 5/5] perf list: specify metrics are to be used with -M
Output of 'perf list metrics' before:
$ perf list metrics
List of pre-defined events (to be used in -e):
Metrics:
C2_Pkg_Residency
[C2 residency percent per package]
...
This misleads the uninitiated user to try:
$ perf stat -e C2_Pkg_Residency
which gets:
event syntax error: 'C2_Pkg_Residency'
\___ parser error
Run 'perf list' for a list of valid events
Explicitly clarify that metrics and metricgroups are meant to
be used with -M, and correct the grammar for the -e equivalent
statement.
Output of 'perf list metrics' after:
$ perf list metrics
List of pre-defined events (to be used with -e):
Metrics (to be used with -M):
C2_Pkg_Residency
[C2 residency percent per package]
...
Signed-off-by: Kim Phillips <kim.phillips@....com>
Cc: Janakarajan Natarajan <Janakarajan.Natarajan@....com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Borislav Petkov <bp@...e.de>
Cc: Martin Liska <mliska@...e.cz>
Cc: Luke Mujica <lukemujica@...gle.com>
Cc: Jin Yao <yao.jin@...ux.intel.com>
Cc: Kan Liang <kan.liang@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org
Cc: linux-perf-users@...r.kernel.org
---
tools/perf/builtin-list.c | 2 +-
tools/perf/util/metricgroup.c | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
index 08e62ae9d37e..be8e878aa556 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -51,7 +51,7 @@ int cmd_list(int argc, const char **argv)
setup_pager();
if (!raw_dump && pager_in_use())
- printf("\nList of pre-defined events (to be used in -e):\n\n");
+ printf("\nList of pre-defined events (to be used with -e):\n\n");
if (argc == 0) {
print_events(NULL, raw_dump, !desc_flag, long_desc_flag,
diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
index a7c0424dbda3..f116848be9f7 100644
--- a/tools/perf/util/metricgroup.c
+++ b/tools/perf/util/metricgroup.c
@@ -377,9 +377,10 @@ void metricgroup__print(bool metrics, bool metricgroups, char *filter,
}
if (metricgroups && !raw)
- printf("\nMetric Groups:\n\n");
+ printf("\nMetric Groups");
else if (metrics && !raw)
- printf("\nMetrics:\n\n");
+ printf("\nMetrics");
+ printf(" (to be used with -M):\n\n");
for (node = rb_first_cached(&groups.entries); node; node = next) {
struct mep *me = container_of(node, struct mep, nd);
--
2.23.0
Powered by blists - more mailing lists