提交 a240f761 编写于 作者: J Joerg Roedel 提交者: Ingo Molnar

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: NJoerg Roedel <joerg.roedel@amd.com>
Signed-off-by: NGleb Natapov <gleb@redhat.com>
Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1317816084-18026-2-git-send-email-gleb@redhat.comSigned-off-by: NIngo Molnar <mingo@elte.hu>
上级 7b4f86ac
......@@ -220,7 +220,10 @@ struct perf_event_attr {
mmap_data : 1, /* non-exec mmap data */
sample_id_all : 1, /* sample_type all events */
__reserved_1 : 45;
exclude_host : 1, /* don't count in host */
exclude_guest : 1, /* don't count in guest */
__reserved_1 : 43;
union {
__u32 wakeup_events; /* wakeup every n events */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册