From: Avi Kivity <avi@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: [PATCH 2/4] kvm_stat: add wrappers for perf_event enable and disable ioctls
Date: Thu, 17 Feb 2011 14:42:48 +0200 [thread overview]
Message-ID: <1297946570-477-3-git-send-email-avi@redhat.com> (raw)
In-Reply-To: <1297946570-477-1-git-send-email-avi@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
---
kvm/kvm_stat | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/kvm/kvm_stat b/kvm/kvm_stat
index 371e547..2e1fe73 100755
--- a/kvm/kvm_stat
+++ b/kvm/kvm_stat
@@ -245,6 +245,12 @@ class Event(object):
import fcntl
fcntl.ioctl(fd, 0x40082406, filter)
self.fd = fd
+ def enable(self):
+ import fcntl
+ fcntl.ioctl(self.fd, 0x00002400, 0)
+ def disable(self):
+ import fcntl
+ fcntl.ioctl(self.fd, 0x00002401, 0)
class TracepointProvider(object):
def __init__(self):
--
1.7.1
next prev parent reply other threads:[~2011-02-17 12:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-17 12:42 [PATCH 0/4] Enable drilldown for kvm_exit reasons Avi Kivity
2011-02-17 12:42 ` [PATCH 1/4] kvm_stat: move groups and events into well defined objects Avi Kivity
2011-02-17 12:42 ` Avi Kivity [this message]
2011-02-17 12:42 ` [PATCH 3/4] kvm_stat: allow enabling/disabling events dynamicalls Avi Kivity
2011-02-17 12:42 ` [PATCH 4/4] kvm_stat: add 'x' key for enabling/disabling "drilldown" 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=1297946570-477-3-git-send-email-avi@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/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