[PATCH 2/4] kvm_stat: add wrappers for perf_event enable and disable ioctls

Avi Kivity
2011-02-17T12:43:06Z

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