summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanosch Frank2016-01-11 16:17:47 +0100
committerPaolo Bonzini2016-01-26 15:58:12 +0100
commit312bf62b7cb37928ef992518df9a0a5e38a2c69a (patch)
tree33672784d7db7aac91399b01f588d813bdd76b98
parentscripts/kvm/kvm_stat: Make cpu detection a function (diff)
downloadqemu-312bf62b7cb37928ef992518df9a0a5e38a2c69a.tar.gz
qemu-312bf62b7cb37928ef992518df9a0a5e38a2c69a.tar.xz
qemu-312bf62b7cb37928ef992518df9a0a5e38a2c69a.zip
scripts/kvm/kvm_stat: Rename _perf_event_open
The underscore in front of the function name does not comply with the python coding guidelines. Reviewed-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-18-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rwxr-xr-xscripts/kvm/kvm_stat4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat
index af24f2d6c7..66dfed6ec3 100755
--- a/scripts/kvm/kvm_stat
+++ b/scripts/kvm/kvm_stat
@@ -314,7 +314,7 @@ class perf_event_attr(ctypes.Structure):
('bp_addr', ctypes.c_uint64),
('bp_len', ctypes.c_uint64),
]
-def _perf_event_open(attr, pid, cpu, group_fd, flags):
+def perf_event_open(attr, pid, cpu, group_fd, flags):
return syscall(SC_PERF_EVT_OPEN, ctypes.pointer(attr), ctypes.c_int(pid),
ctypes.c_int(cpu), ctypes.c_int(group_fd),
ctypes.c_long(flags))
@@ -358,7 +358,7 @@ class Event(object):
group_leader = -1
if group.events:
group_leader = group.events[0].fd
- fd = _perf_event_open(attr, -1, group.cpu, group_leader, 0)
+ fd = perf_event_open(attr, -1, group.cpu, group_leader, 0)
if fd == -1:
err = ctypes.get_errno()
raise OSError(err, os.strerror(err),