From: Gleb Natapov <gleb@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: avi@redhat.com, kvm@vger.kernel.org, joerg.roedel@amd.com,
mingo@elte.hu, a.p.zijlstra@chello.nl
Subject: [PATCH v2 1/9] perf, core: Introduce attrs to count in either host or guest mode
Date: Wed, 5 Oct 2011 14:01:16 +0200 [thread overview]
Message-ID: <1317816084-18026-2-git-send-email-gleb@redhat.com> (raw)
In-Reply-To: <1317816084-18026-1-git-send-email-gleb@redhat.com>
From: Joerg Roedel <joerg.roedel@amd.com>
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>
---
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 c816075..1e9ebe5 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -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 */
--
1.7.5.3
next prev parent reply other threads:[~2011-10-05 12:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-05 12:01 [PATCH v2 0/9] perf support for x86 guest/host-only bits Gleb Natapov
2011-10-05 12:01 ` Gleb Natapov [this message]
2011-10-05 12:01 ` [PATCH v2 2/9] perf, amd: Use GO/HO bits in perf-ctr Gleb Natapov
2011-10-05 12:01 ` [PATCH v2 3/9] perf, tools: Add support for guest/host-only profiling Gleb Natapov
2011-10-05 12:01 ` [PATCH v2 4/9] perf, tools: Fix copy&paste error in perf-kvm option description Gleb Natapov
2012-01-04 15:27 ` [tip:perf/core] perf kvm: Fix copy & paste error in description tip-bot for Joerg Roedel
2011-10-05 12:01 ` [PATCH v2 5/9] perf, tools: Do guest-only counting in perf-kvm by default Gleb Natapov
2011-10-05 12:01 ` [PATCH v2 6/9] perf, intel: Use GO/HO bits in perf-ctr Gleb Natapov
2011-10-05 14:18 ` Peter Zijlstra
2011-10-05 12:01 ` [PATCH v2 7/9] KVM, VMX: add support for switching of PERF_GLOBAL_CTRL Gleb Natapov
2011-10-05 12:01 ` [PATCH v2 8/9] KVM, VMX: Add support for guest/host-only profiling Gleb Natapov
2011-10-05 14:19 ` Peter Zijlstra
2011-10-05 15:29 ` Gleb Natapov
2011-10-05 15:34 ` Peter Zijlstra
2011-10-05 12:01 ` [PATCH v2 9/9] KVM, VMX: Check for automatic switch msr table overflow Gleb Natapov
2011-10-05 13:48 ` [PATCH v2 0/9] perf support for x86 guest/host-only bits Avi Kivity
2011-10-05 14:22 ` Peter Zijlstra
2011-10-10 10:34 ` Roedel, Joerg
2011-11-02 12:47 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1317816084-18026-2-git-send-email-gleb@redhat.com \
--to=gleb@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=avi@redhat.com \
--cc=joerg.roedel@amd.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®