diff options
author | Paul Mackerras <paulus@samba.org> | 2009-06-30 02:07:19 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-30 06:00:16 -0400 |
commit | 57e7986ed142417498155ebcd5eaf617ac37136d (patch) | |
tree | 81ce9acd79ee7e6383dfd5cdadc4e016a012990e /include/linux/perf_counter.h | |
parent | 051ae7f7344f453616b6b10332d4d8e1d40ed823 (diff) |
perf_counter: Provide a way to enable counters on exec
This provides a way to mark a counter to be enabled on the next
exec. This is useful for measuring the total activity of a
program without including overhead from the process that
launches it.
This also changes the perf stat command to use this new
facility.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <19017.43927.838745.689203@cargo.ozlabs.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/perf_counter.h')
-rw-r--r-- | include/linux/perf_counter.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index 3078e23c91eb..5e970c7d3fd5 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h | |||
@@ -179,8 +179,9 @@ struct perf_counter_attr { | |||
179 | comm : 1, /* include comm data */ | 179 | comm : 1, /* include comm data */ |
180 | freq : 1, /* use freq, not period */ | 180 | freq : 1, /* use freq, not period */ |
181 | inherit_stat : 1, /* per task counts */ | 181 | inherit_stat : 1, /* per task counts */ |
182 | enable_on_exec : 1, /* next exec enables */ | ||
182 | 183 | ||
183 | __reserved_1 : 52; | 184 | __reserved_1 : 51; |
184 | 185 | ||
185 | __u32 wakeup_events; /* wakeup every n events */ | 186 | __u32 wakeup_events; /* wakeup every n events */ |
186 | __u32 __reserved_2; | 187 | __u32 __reserved_2; |