From: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>
To: peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
alexander.shishkin@linux.intel.com, jolsa@redhat.com,
namhyung@kernel.org, linux-kernel@vger.kernel.org
Cc: s1seetee@linux.vnet.ibm.com
Subject: [PATCH] perf script: Show hw-cache events
Date: Fri, 8 Jun 2018 16:32:28 +0530 [thread overview]
Message-ID: <1528455748-20087-1-git-send-email-s1seetee@linux.vnet.ibm.com> (raw)
perf script fails to report hardware cache events (PERF_TYPE_HW_CACHE)
where as perf report shows the samples. Fix it. Ex,
# perf record -e L1-dcache-loads ./a.out
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.008 MB perf.data (11 samples)]
Before patch:
# perf script | wc -l
0
After patch:
# perf script | wc -l
11
Signed-off-by: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>
---
tools/perf/builtin-script.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index cefc881..9e94bb7 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -180,6 +180,18 @@ enum {
PERF_OUTPUT_EVNAME | PERF_OUTPUT_TRACE
},
+ [PERF_TYPE_HW_CACHE] = {
+ .user_set = false,
+
+ .fields = PERF_OUTPUT_COMM | PERF_OUTPUT_TID |
+ PERF_OUTPUT_CPU | PERF_OUTPUT_TIME |
+ PERF_OUTPUT_EVNAME | PERF_OUTPUT_IP |
+ PERF_OUTPUT_SYM | PERF_OUTPUT_SYMOFFSET |
+ PERF_OUTPUT_DSO | PERF_OUTPUT_PERIOD,
+
+ .invalid_fields = PERF_OUTPUT_TRACE | PERF_OUTPUT_BPF_OUTPUT,
+ },
+
[PERF_TYPE_RAW] = {
.user_set = false,
--
1.8.3.1
next reply other threads:[~2018-06-08 11:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-08 11:02 Seeteena Thoufeek [this message]
2018-06-08 16:47 ` Arnaldo Carvalho de Melo
2018-06-14 6:24 ` [tip:perf/urgent] " tip-bot for Seeteena Thoufeek
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=1528455748-20087-1-git-send-email-s1seetee@linux.vnet.ibm.com \
--to=s1seetee@linux.vnet.ibm.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/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®