提交 312bf62b 编写于 作者: J Janosch Frank 提交者: Paolo Bonzini

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: NJason J. Herne <jjherne@linux.vnet.ibm.com>
Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com>
Message-Id: <1452525484-32309-18-git-send-email-frankja@linux.vnet.ibm.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 3e46a5c2
......@@ -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),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册