From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Yunlong Song <yunlong.song@huawei.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Wang Nan <wangnan0@huawei.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 39/43] perf list: Place the header text in its right position
Date: Fri, 13 Feb 2015 17:49:28 -0300 [thread overview]
Message-ID: <1423860572-24881-40-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1423860572-24881-1-git-send-email-acme@kernel.org>
From: Yunlong Song <yunlong.song@huawei.com>
The hearer text 'List of pre-defined events (to be used in -e):' is
placed in an improper function, which causes an abnormal output, e.g.
'perf list hw' shows no guiding text at all, and 'perf list hw
L1-dcache*' shows the guiding text incorrectly in the middle of the
output.
Example
Before this patch:
$ perf list hw L1-dcache*
branch-instructions OR branches [Hardware event]
branch-misses [Hardware event]
bus-cycles [Hardware event]
cache-misses [Hardware event]
cache-references [Hardware event]
cpu-cycles OR cycles [Hardware event]
instructions [Hardware event]
stalled-cycles-backend OR idle-cycles-backend [Hardware event]
stalled-cycles-frontend OR idle-cycles-frontend [Hardware event]
List of pre-defined events (to be used in -e): <-- incorrect position
L1-dcache-load-misses [Hardware cache event]
L1-dcache-loads [Hardware cache event]
L1-dcache-prefetch-misses [Hardware cache event]
L1-dcache-prefetches [Hardware cache event]
L1-dcache-store-misses [Hardware cache event]
L1-dcache-stores [Hardware cache event]
After this patch:
$ perf list hw L1-dcache*
List of pre-defined events (to be used in -e): <-- correct position
branch-instructions OR branches [Hardware event]
branch-misses [Hardware event]
bus-cycles [Hardware event]
cache-misses [Hardware event]
cache-references [Hardware event]
cpu-cycles OR cycles [Hardware event]
instructions [Hardware event]
stalled-cycles-backend OR idle-cycles-backend [Hardware event]
stalled-cycles-frontend OR idle-cycles-frontend [Hardware event]
L1-dcache-load-misses [Hardware cache event]
L1-dcache-loads [Hardware cache event]
L1-dcache-prefetch-misses [Hardware cache event]
L1-dcache-prefetches [Hardware cache event]
L1-dcache-store-misses [Hardware cache event]
L1-dcache-stores [Hardware cache event]
Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1423833115-11199-8-git-send-email-yunlong.song@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-list.c | 3 +++
tools/perf/util/parse-events.c | 5 -----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
index 198f3c3aff95..ad8018e26aa0 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -41,6 +41,9 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
return 0;
}
+ if (!raw_dump)
+ printf("\nList of pre-defined events (to be used in -e):\n\n");
+
if (argc == 0) {
print_events(NULL, false);
return 0;
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index ecf069b1661f..109ba5c8c2e5 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -1319,11 +1319,6 @@ static void print_symbol_events(const char *event_glob, unsigned type,
*/
void print_events(const char *event_glob, bool name_only)
{
- if (!name_only) {
- printf("\n");
- printf("List of pre-defined events (to be used in -e):\n");
- }
-
print_symbol_events(event_glob, PERF_TYPE_HARDWARE,
event_symbols_hw, PERF_COUNT_HW_MAX, name_only);
--
1.9.3
next prev parent reply other threads:[~2015-02-13 20:53 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-13 20:48 [GIT PULL 00/43] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-02-13 20:48 ` [PATCH 01/43] tools build: Add new build support Arnaldo Carvalho de Melo
2015-02-13 20:48 ` [PATCH 02/43] tools build: Add detected config support Arnaldo Carvalho de Melo
2015-02-13 20:48 ` [PATCH 03/43] tools build: Add subdir support Arnaldo Carvalho de Melo
2015-02-13 20:48 ` [PATCH 04/43] perf tools: Remove api fs object from python build Arnaldo Carvalho de Melo
2015-02-13 20:48 ` [PATCH 05/43] perf build: Disable make's built-in rules Arnaldo Carvalho de Melo
2015-02-13 20:48 ` [PATCH 06/43] perf build: Add bench objects building Arnaldo Carvalho de Melo
2015-02-13 20:48 ` [PATCH 07/43] perf build: Add tests " Arnaldo Carvalho de Melo
2015-02-13 20:48 ` [PATCH 08/43] perf build: Add builtin " Arnaldo Carvalho de Melo
2015-02-13 20:48 ` [PATCH 09/43] perf build: Add libperf " Arnaldo Carvalho de Melo
2015-02-13 20:48 ` [PATCH 10/43] perf build: Add probe " Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 11/43] perf build: Add dwarf " Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 12/43] perf build: Add dwarf unwind " Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 13/43] perf build: Add ui " Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 14/43] perf build: Add slang " Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 15/43] perf build: Add gtk " Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 16/43] perf build: Add scripts " Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 17/43] perf build: Add perf regs " Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 18/43] perf build: Add zlib " Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 19/43] perf build: Add perf.o object building Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 20/43] perf build: Add arch x86 objects building Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 21/43] perf build: Add arch arm " Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 22/43] perf build: Add arch arm64 " Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 23/43] perf build: Add arch powerpc " Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 24/43] perf build: Add arch s390 " Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 25/43] perf build: Add arch sh " Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 26/43] perf build: Add arch sparc " Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 27/43] perf build: Add single target build framework support Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 28/43] perf build: Remove directory dependency rules Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 29/43] perf build: Remove uneeded variables Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 30/43] perf build: Remove PERF-CFLAGS file Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 31/43] perf build: Add build documentation Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 32/43] tools lib api: Use tools build framework Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 33/43] tools lib api: Rename libapikfs.a to libapi.a Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 34/43] tools lib traceevent: Use tools build framework Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 35/43] tools lib lockdep: " Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 36/43] perf build: Display make commands on V=1 Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 37/43] perf tools: Fix a bug of segmentation fault Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 38/43] perf: Remove the extra validity check on nr_pages Arnaldo Carvalho de Melo
2015-02-13 20:49 ` Arnaldo Carvalho de Melo [this message]
2015-02-13 20:49 ` [PATCH 40/43] perf trace: Print thread info when following children Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 41/43] perf trace: Handle multiple threads better wrt syscalls being intermixed Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 42/43] perf trace: Allow mixing with other events Arnaldo Carvalho de Melo
2015-02-13 20:49 ` [PATCH 43/43] perf trace: Support --events foo:bar --no-syscalls Arnaldo Carvalho de Melo
2015-02-18 18:19 ` [GIT PULL 00/43] perf/core improvements and fixes Ingo Molnar
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=1423860572-24881-40-git-send-email-acme@kernel.org \
--to=acme@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulus@samba.org \
--cc=wangnan0@huawei.com \
--cc=yunlong.song@huawei.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
all inboxes | Powered by JetHome®