summaryrefslogtreecommitdiffstats
path: root/tapset/perf.stp
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2010-03-18 08:04:21 -0400
committerFrank Ch. Eigler <fche@elastic.org>2010-03-18 08:04:21 -0400
commit95ef3b3011e48bc1a5775c320d3bbc7b84853512 (patch)
tree963dc84e7afe32eba2707137b2b092a6690b75e5 /tapset/perf.stp
parent654979ee0fc8d47bfd1680bc9e4c42ab2da78846 (diff)
downloadsystemtap-steved-95ef3b3011e48bc1a5775c320d3bbc7b84853512.tar.gz
systemtap-steved-95ef3b3011e48bc1a5775c320d3bbc7b84853512.tar.xz
systemtap-steved-95ef3b3011e48bc1a5775c320d3bbc7b84853512.zip
PR909: switch to tapset-based attr/type resolution
* tapset/perf.stp: New file. * tapset-perfmon.cxx (perf_derived_probe): Drop event_name field throughout. Listen to type(N).config(M) instead.
Diffstat (limited to 'tapset/perf.stp')
-rw-r--r--tapset/perf.stp29
1 files changed, 29 insertions, 0 deletions
diff --git a/tapset/perf.stp b/tapset/perf.stp
new file mode 100644
index 00000000..cdc4ef9d
--- /dev/null
+++ b/tapset/perf.stp
@@ -0,0 +1,29 @@
+// pcl aka perf aka perf-events tapset
+// Copyright (C) 2010 Red Hat Inc.
+//
+// This file is free software. You can redistribute it and/or modify it under
+// the terms of the GNU General Public License (GPL), version 2.
+
+// The type and config values are part of the sys_perf_event_open() ABI,
+// 'perf_event_attr' struct. See <include/linux/perf_event.h>.
+
+// PERF_TYPE_HW
+probe perf.hw.cpu_cycles = perf.type(0).config(0) { }
+probe perf.hw.instructions = perf.type(0).config(1) { }
+probe perf.hw.cache_references = perf.type(0).config(2) { }
+probe perf.hw.cache_misses = perf.type(0).config(3) { }
+probe perf.hw.branch_instructions = perf.type(0).config(4) { }
+probe perf.hw.branch_misses = perf.type(0).config(5) { }
+probe perf.hw.bus_cycles = perf.type(0).config(6) { }
+
+// PERF_TYPE_SOFTWARE
+probe perf.sw.cpu_clock = perf.type(1).config(0) { }
+probe perf.sw.task_clock = perf.type(1).config(1) { }
+probe perf.sw.page_faults = perf.type(1).config(2) { }
+probe perf.sw.context_switches = perf.type(1).config(3) { }
+probe perf.sw.cpu_migrations = perf.type(1).config(4) { }
+probe perf.sw.page_faults_min = perf.type(1).config(5) { }
+probe perf.sw.page_faults_maj = perf.type(1).config(6) { }
+probe perf.sw.alignment_faults = perf.type(1).config(7) { }
+probe perf.sw.emulation_faults = perf.type(1).config(8) { }
+