From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7079-0003TL-6W for qemu-devel@nongnu.org; Thu, 10 Dec 2015 07:14:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7075-0003zD-3D for qemu-devel@nongnu.org; Thu, 10 Dec 2015 07:14:27 -0500 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:58472) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7074-0003la-Ru for qemu-devel@nongnu.org; Thu, 10 Dec 2015 07:14:23 -0500 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 10 Dec 2015 12:13:57 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id F21E92190046 for ; Thu, 10 Dec 2015 12:13:45 +0000 (GMT) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tBACDrhj2621714 for ; Thu, 10 Dec 2015 12:13:53 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tBACDql4025038 for ; Thu, 10 Dec 2015 05:13:53 -0700 From: Janosch Frank Date: Thu, 10 Dec 2015 13:12:34 +0100 Message-Id: <1449749584-23214-5-git-send-email-frankja@linux.vnet.ibm.com> In-Reply-To: <1449749584-23214-1-git-send-email-frankja@linux.vnet.ibm.com> References: <1449749584-23214-1-git-send-email-frankja@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 04/34] scripts/kvm/kvm_stat: Removed unneeded PERF constants List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: cornelia.huck@de.ibm.com, frankja@linux.vnet.ibm.com Only two of the constants are actually needed to set up the events, so the others were removed. All variables that used them were also removed. --- scripts/kvm/kvm_stat | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat index c4bf900..7a8617d 100755 --- a/scripts/kvm/kvm_stat +++ b/scripts/kvm/kvm_stat @@ -325,29 +325,8 @@ def _perf_event_open(attr, pid, cpu, group_fd, flags): ctypes.c_int(cpu), ctypes.c_int(group_fd), ctypes.c_long(flags)) -PERF_TYPE_HARDWARE = 0 -PERF_TYPE_SOFTWARE = 1 -PERF_TYPE_TRACEPOINT = 2 -PERF_TYPE_HW_CACHE = 3 -PERF_TYPE_RAW = 4 -PERF_TYPE_BREAKPOINT = 5 - -PERF_SAMPLE_IP = 1 << 0 -PERF_SAMPLE_TID = 1 << 1 -PERF_SAMPLE_TIME = 1 << 2 -PERF_SAMPLE_ADDR = 1 << 3 -PERF_SAMPLE_READ = 1 << 4 -PERF_SAMPLE_CALLCHAIN = 1 << 5 -PERF_SAMPLE_ID = 1 << 6 -PERF_SAMPLE_CPU = 1 << 7 -PERF_SAMPLE_PERIOD = 1 << 8 -PERF_SAMPLE_STREAM_ID = 1 << 9 -PERF_SAMPLE_RAW = 1 << 10 - -PERF_FORMAT_TOTAL_TIME_ENABLED = 1 << 0 -PERF_FORMAT_TOTAL_TIME_RUNNING = 1 << 1 -PERF_FORMAT_ID = 1 << 2 -PERF_FORMAT_GROUP = 1 << 3 +PERF_TYPE_TRACEPOINT = 2 +PERF_FORMAT_GROUP = 1 << 3 sys_tracing = '/sys/kernel/debug/tracing' @@ -378,9 +357,6 @@ class Event(object): tracepoint, 'id') id = int(file(id_path).read()) attr.config = id - attr.sample_type = (PERF_SAMPLE_RAW - | PERF_SAMPLE_TIME - | PERF_SAMPLE_CPU) attr.sample_period = 1 attr.read_format = PERF_FORMAT_GROUP group_leader = -1 -- 2.3.0