aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_counter.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2009-03-04 04:36:51 -0500
committerPaul Mackerras <paulus@samba.org>2009-03-04 04:36:51 -0500
commit2743a5b0fa6f309da904f2190a9cc25deee34dbd (patch)
tree0efad6834902a3e0621bf9a74e5cde8cd49f97e6 /include/linux/perf_counter.h
parenta1ef58f442542d8b3e3b963339fbc522c36e827c (diff)
perfcounters: provide expansion room in the ABI
Impact: ABI change This expands several fields in the perf_counter_hw_event struct and adds a "flags" argument to the perf_counter_open system call, in order that features can be added in future without ABI changes. In particular the record_type field is expanded to 64 bits, and the space for flag bits has been expanded from 32 to 64 bits. This also adds some new fields: * read_format (64 bits) is intended to provide a way to specify what userspace wants to get back when it does a read() on a simple (non-interrupting) counter; * exclude_idle (1 bit) provides a way for userspace to ask that events that occur when the cpu is idle be excluded; * extra_config_len will provide a way for userspace to supply an arbitrary amount of extra machine-specific PMU configuration data immediately following the perf_counter_hw_event struct, to allow sophisticated users to program things such as instruction matching CAMs and address range registers; * __reserved_3 and __reserved_4 provide space for future expansion. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/linux/perf_counter.h')
-rw-r--r--include/linux/perf_counter.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
index 186efaf49665..c42455ab1558 100644
--- a/include/linux/perf_counter.h
+++ b/include/linux/perf_counter.h
@@ -69,9 +69,10 @@ struct perf_counter_hw_event {
69 __s64 type; 69 __s64 type;
70 70
71 __u64 irq_period; 71 __u64 irq_period;
72 __u32 record_type; 72 __u64 record_type;
73 __u64 read_format;
73 74
74 __u32 disabled : 1, /* off by default */ 75 __u64 disabled : 1, /* off by default */
75 nmi : 1, /* NMI sampling */ 76 nmi : 1, /* NMI sampling */
76 raw : 1, /* raw event type */ 77 raw : 1, /* raw event type */
77 inherit : 1, /* children inherit it */ 78 inherit : 1, /* children inherit it */
@@ -80,10 +81,15 @@ struct perf_counter_hw_event {
80 exclude_user : 1, /* don't count user */ 81 exclude_user : 1, /* don't count user */
81 exclude_kernel : 1, /* ditto kernel */ 82 exclude_kernel : 1, /* ditto kernel */
82 exclude_hv : 1, /* ditto hypervisor */ 83 exclude_hv : 1, /* ditto hypervisor */
84 exclude_idle : 1, /* don't count when idle */
83 85
84 __reserved_1 : 23; 86 __reserved_1 : 55;
87
88 __u32 extra_config_len;
89 __u32 __reserved_4;
85 90
86 __u64 __reserved_2; 91 __u64 __reserved_2;
92 __u64 __reserved_3;
87}; 93};
88 94
89/* 95/*