diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-06-23 14:13:11 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-25 15:39:07 -0400 |
commit | 38b200d67636a30cb8dc1508137908e7a649b5c9 (patch) | |
tree | 74f88d57a7f55075d4cd0b46690ff4b319dca642 /include | |
parent | 194002b274e9169a04beb1b23dcc132159bb566c (diff) |
perf_counter: Add PERF_EVENT_READ
Provide a read() like event which can be used to log the
counter value at specific sites such as child->parent
folding on exit.
In order to be useful, we log the counter parent ID, not the
actual counter ID, since userspace can only relate parent
IDs to perf_counter_attr constructs.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/perf_counter.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index bcbf1c43ed42..6a384f04755a 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h | |||
@@ -335,6 +335,18 @@ enum perf_event_type { | |||
335 | PERF_EVENT_FORK = 7, | 335 | PERF_EVENT_FORK = 7, |
336 | 336 | ||
337 | /* | 337 | /* |
338 | * struct { | ||
339 | * struct perf_event_header header; | ||
340 | * u32 pid, tid; | ||
341 | * u64 value; | ||
342 | * { u64 time_enabled; } && PERF_FORMAT_ENABLED | ||
343 | * { u64 time_running; } && PERF_FORMAT_RUNNING | ||
344 | * { u64 parent_id; } && PERF_FORMAT_ID | ||
345 | * }; | ||
346 | */ | ||
347 | PERF_EVENT_READ = 8, | ||
348 | |||
349 | /* | ||
338 | * When header.misc & PERF_EVENT_MISC_OVERFLOW the event_type field | 350 | * When header.misc & PERF_EVENT_MISC_OVERFLOW the event_type field |
339 | * will be PERF_SAMPLE_* | 351 | * will be PERF_SAMPLE_* |
340 | * | 352 | * |