aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/parse-events.c
diff options
context:
space:
mode:
authorJaswinder Singh Rajput <jaswinder@kernel.org>2009-07-01 09:06:18 -0400
committerIngo Molnar <mingo@elte.hu>2009-07-01 09:25:03 -0400
commit73c24cb86c51ff6445b292d9914d31236204393b (patch)
tree6b5afd1b9af88565fdb6e70b4771f8e9db8c75d8 /tools/perf/util/parse-events.c
parentb9ebdcc0ce1c676ebf5dc4f6df6b440d8fcf88ab (diff)
perf list: Add cache events
After: $ ./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-d$-loads [Hardware cache event] L1-d$-load-misses [Hardware cache event] L1-d$-stores [Hardware cache event] L1-d$-store-misses [Hardware cache event] L1-d$-prefetches [Hardware cache event] L1-d$-prefetch-misses [Hardware cache event] L1-i$-loads [Hardware cache event] L1-i$-load-misses [Hardware cache event] L1-i$-prefetches [Hardware cache event] L1-i$-prefetch-misses [Hardware cache event] LLC-loads [Hardware cache event] LLC-load-misses [Hardware cache event] LLC-stores [Hardware cache event] LLC-store-misses [Hardware cache event] LLC-prefetches [Hardware cache event] LLC-prefetch-misses [Hardware cache event] dTLB-loads [Hardware cache event] dTLB-load-misses [Hardware cache event] dTLB-stores [Hardware cache event] dTLB-store-misses [Hardware cache event] dTLB-prefetches [Hardware cache event] dTLB-prefetch-misses [Hardware cache event] iTLB-loads [Hardware cache event] iTLB-load-misses [Hardware cache event] branch-loads [Hardware cache event] branch-load-misses [Hardware cache event] rNNN [raw hardware event descriptor] Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <1246453578.3072.1.camel@ht.satnam> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/parse-events.c')
-rw-r--r--tools/perf/util/parse-events.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index aed70901df24..5184959e0615 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -428,7 +428,7 @@ static const char * const event_type_descriptors[] = {
428void print_events(void) 428void print_events(void)
429{ 429{
430 struct event_symbol *syms = event_symbols; 430 struct event_symbol *syms = event_symbols;
431 unsigned int i, type, prev_type = -1; 431 unsigned int i, type, op, prev_type = -1;
432 char name[40]; 432 char name[40];
433 433
434 fprintf(stderr, "\n"); 434 fprintf(stderr, "\n");
@@ -453,6 +453,21 @@ void print_events(void)
453 } 453 }
454 454
455 fprintf(stderr, "\n"); 455 fprintf(stderr, "\n");
456 for (type = 0; type < PERF_COUNT_HW_CACHE_MAX; type++) {
457 for (op = 0; op < PERF_COUNT_HW_CACHE_OP_MAX; op++) {
458 /* skip invalid cache type */
459 if (!is_cache_op_valid(type, op))
460 continue;
461
462 for (i = 0; i < PERF_COUNT_HW_CACHE_RESULT_MAX; i++) {
463 fprintf(stderr, " %-40s [%s]\n",
464 event_cache_name(type, op, i),
465 event_type_descriptors[4]);
466 }
467 }
468 }
469
470 fprintf(stderr, "\n");
456 fprintf(stderr, " %-40s [raw hardware event descriptor]\n", 471 fprintf(stderr, " %-40s [raw hardware event descriptor]\n",
457 "rNNN"); 472 "rNNN");
458 fprintf(stderr, "\n"); 473 fprintf(stderr, "\n");