From: Jaswinder Singh Rajput <jaswinder@kernel.org>
To: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH -tip] perf_counter util: Added Hardware cache event in perf list
Date: Tue, 23 Jun 2009 03:08:08 +0530 [thread overview]
Message-ID: <1245706688.6167.23.camel@localhost.localdomain> (raw)
./perf list
List of pre-defined events (to be used in -e):
cpu-cycles OR cycles [Hardware event]
instructions [Hardware event]
cache-references [Hardware event]
cache-misses [Hardware event]
branch-instructions OR branches [Hardware event]
branch-misses [Hardware event]
bus-cycles [Hardware event]
cpu-clock [Software event]
task-clock [Software event]
page-faults OR faults [Software event]
minor-faults [Software event]
major-faults [Software event]
context-switches OR cs [Software event]
cpu-migrations OR migrations [Software event]
L1-data-Cache-Load-Reference [Hardware cache event]
L1-data-Cache-Load-Miss [Hardware cache event]
L1-data-Cache-Store-Reference [Hardware cache event]
L1-data-Cache-Store-Miss [Hardware cache event]
L1-data-Cache-Prefetch-Reference [Hardware cache event]
L1-data-Cache-Prefetch-Miss [Hardware cache event]
L1-instruction-Cache-Load-Reference [Hardware cache event]
L1-instruction-Cache-Load-Miss [Hardware cache event]
L1-instruction-Cache-Store-Reference [Hardware cache event]
L1-instruction-Cache-Store-Miss [Hardware cache event]
L1-instruction-Cache-Prefetch-Reference [Hardware cache event]
L1-instruction-Cache-Prefetch-Miss [Hardware cache event]
L2-Cache-Load-Reference [Hardware cache event]
L2-Cache-Load-Miss [Hardware cache event]
L2-Cache-Store-Reference [Hardware cache event]
L2-Cache-Store-Miss [Hardware cache event]
L2-Cache-Prefetch-Reference [Hardware cache event]
L2-Cache-Prefetch-Miss [Hardware cache event]
Data-TLB-Cache-Load-Reference [Hardware cache event]
Data-TLB-Cache-Load-Miss [Hardware cache event]
Data-TLB-Cache-Store-Reference [Hardware cache event]
Data-TLB-Cache-Store-Miss [Hardware cache event]
Data-TLB-Cache-Prefetch-Reference [Hardware cache event]
Data-TLB-Cache-Prefetch-Miss [Hardware cache event]
Instruction-TLB-Cache-Load-Reference [Hardware cache event]
Instruction-TLB-Cache-Load-Miss [Hardware cache event]
Instruction-TLB-Cache-Store-Reference [Hardware cache event]
Instruction-TLB-Cache-Store-Miss [Hardware cache event]
Instruction-TLB-Cache-Prefetch-Reference [Hardware cache event]
Instruction-TLB-Cache-Prefetch-Miss [Hardware cache event]
Branch-Cache-Load-Reference [Hardware cache event]
Branch-Cache-Load-Miss [Hardware cache event]
Branch-Cache-Store-Reference [Hardware cache event]
Branch-Cache-Store-Miss [Hardware cache event]
Branch-Cache-Prefetch-Reference [Hardware cache event]
Branch-Cache-Prefetch-Miss [Hardware cache event]
rNNN [raw hardware event descriptor]
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
tools/perf/util/parse-events.c | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 06af2fa..6e5ffa0 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -296,8 +296,8 @@ static const char * const event_type_descriptors[] = {
void print_events(void)
{
struct event_symbol *syms = event_symbols;
- unsigned int i, type, prev_type = -1;
- char name[40];
+ unsigned int i, type, op, prev_type = -1;
+ char name[50];
fprintf(stderr, "\n");
fprintf(stderr, "List of pre-defined events (to be used in -e):\n");
@@ -314,14 +314,28 @@ void print_events(void)
sprintf(name, "%s OR %s", syms->symbol, syms->alias);
else
strcpy(name, syms->symbol);
- fprintf(stderr, " %-40s [%s]\n", name,
+ fprintf(stderr, " %-45s [%s]\n", name,
event_type_descriptors[type]);
prev_type = type;
}
fprintf(stderr, "\n");
- fprintf(stderr, " %-40s [raw hardware event descriptor]\n",
+ for (type = 0; type < PERF_COUNT_HW_CACHE_MAX; type++) {
+ for (op = 0; op < PERF_COUNT_HW_CACHE_OP_MAX; op++) {
+ for (i = 0; i < PERF_COUNT_HW_CACHE_RESULT_MAX; i++) {
+ sprintf(name, "%s-Cache-%s-%s",
+ hw_cache[type][0],
+ hw_cache_op[op][0],
+ hw_cache_result[i][0]);
+ fprintf(stderr, " %-45s [%s]\n", name,
+ event_type_descriptors[4]);
+ }
+ }
+ }
+
+ fprintf(stderr, "\n");
+ fprintf(stderr, " %-45s [raw hardware event descriptor]\n",
"rNNN");
fprintf(stderr, "\n");
--
1.6.0.6
reply other threads:[~2009-06-22 21:38 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=1245706688.6167.23.camel@localhost.localdomain \
--to=jaswinder@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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