diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-05-15 09:19:28 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-15 09:26:56 -0400 |
commit | 60db5e09c13109b13830cc9dcae688003fd39e79 (patch) | |
tree | ac923b89c28d735d2460216202d960e9c6237be0 /include/linux/perf_counter.h | |
parent | 789f90fcf6b0b54e655740e9396c954378542c79 (diff) |
perf_counter: frequency based adaptive irq_period
Instead of specifying the irq_period for a counter, provide a target interrupt
frequency and dynamically adapt the irq_period to match this frequency.
[ Impact: new perf-counter attribute/feature ]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <20090515132018.646195868@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/perf_counter.h')
-rw-r--r-- | include/linux/perf_counter.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index e543ecc129f1..004b6e162b96 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h | |||
@@ -130,7 +130,11 @@ struct perf_counter_hw_event { | |||
130 | */ | 130 | */ |
131 | __u64 config; | 131 | __u64 config; |
132 | 132 | ||
133 | __u64 irq_period; | 133 | union { |
134 | __u64 irq_period; | ||
135 | __u64 irq_freq; | ||
136 | }; | ||
137 | |||
134 | __u32 record_type; | 138 | __u32 record_type; |
135 | __u32 read_format; | 139 | __u32 read_format; |
136 | 140 | ||
@@ -146,8 +150,9 @@ struct perf_counter_hw_event { | |||
146 | mmap : 1, /* include mmap data */ | 150 | mmap : 1, /* include mmap data */ |
147 | munmap : 1, /* include munmap data */ | 151 | munmap : 1, /* include munmap data */ |
148 | comm : 1, /* include comm data */ | 152 | comm : 1, /* include comm data */ |
153 | freq : 1, /* use freq, not period */ | ||
149 | 154 | ||
150 | __reserved_1 : 52; | 155 | __reserved_1 : 51; |
151 | 156 | ||
152 | __u32 extra_config_len; | 157 | __u32 extra_config_len; |
153 | __u32 wakeup_events; /* wakeup every n events */ | 158 | __u32 wakeup_events; /* wakeup every n events */ |
@@ -337,6 +342,7 @@ struct hw_perf_counter { | |||
337 | atomic64_t prev_count; | 342 | atomic64_t prev_count; |
338 | u64 irq_period; | 343 | u64 irq_period; |
339 | atomic64_t period_left; | 344 | atomic64_t period_left; |
345 | u64 interrupts; | ||
340 | #endif | 346 | #endif |
341 | }; | 347 | }; |
342 | 348 | ||