From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: [PATCH 2/4] kvm_stat: add wrappers for perf_event enable and disable ioctls Date: Thu, 17 Feb 2011 14:42:48 +0200 Message-ID: <1297946570-477-3-git-send-email-avi@redhat.com> References: <1297946570-477-1-git-send-email-avi@redhat.com> To: Marcelo Tosatti , kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:28433 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753705Ab1BQMnG (ORCPT ); Thu, 17 Feb 2011 07:43:06 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1HCh6GV002901 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 17 Feb 2011 07:43:06 -0500 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p1HCh5AU032521 for ; Thu, 17 Feb 2011 07:43:05 -0500 In-Reply-To: <1297946570-477-1-git-send-email-avi@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Signed-off-by: Avi Kivity --- 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