diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2011-10-05 08:01:16 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-10-06 07:00:28 -0400 |
commit | a240f76165e6255384d4bdb8139895fac7988799 (patch) | |
tree | 1c1f9f5aa459573bd0a084912f8629d08457e4e5 /include/linux/perf_event.h | |
parent | 7b4f86ac057821740e8499afde6faf9c7b08f69f (diff) |
perf, core: Introduce attrs to count in either host or guest mode
The two new attributes exclude_guest and exclude_host can
bes used by user-space to tell the kernel to setup
performance counter to either only count while the CPU is in
guest or in host mode.
An additional check is also introduced to make sure
user-space does not try to exclude guest and host mode from
counting.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1317816084-18026-2-git-send-email-gleb@redhat.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index c816075c01ce..1e9ebe5e0091 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -220,7 +220,10 @@ struct perf_event_attr { | |||
220 | mmap_data : 1, /* non-exec mmap data */ | 220 | mmap_data : 1, /* non-exec mmap data */ |
221 | sample_id_all : 1, /* sample_type all events */ | 221 | sample_id_all : 1, /* sample_type all events */ |
222 | 222 | ||
223 | __reserved_1 : 45; | 223 | exclude_host : 1, /* don't count in host */ |
224 | exclude_guest : 1, /* don't count in guest */ | ||
225 | |||
226 | __reserved_1 : 43; | ||
224 | 227 | ||
225 | union { | 228 | union { |
226 | __u32 wakeup_events; /* wakeup every n events */ | 229 | __u32 wakeup_events; /* wakeup every n events */ |