26 if (len(raw_buf) == 144):
27 event =
PebsEvent(name, comm, dso, symbol, raw_buf)
28 elif (len(raw_buf) == 176):
29 event =
PebsNHM(name, comm, dso, symbol, raw_buf)
31 event =
PerfEvent(name, comm, dso, symbol, raw_buf)
37 def __init__(self, name, comm, dso, symbol, raw_buf, ev_type=EVTYPE_GENERIC):
44 PerfEvent.event_num += 1
47 print "PMU event: name=%12s, symbol=%24s, comm=%8s, dso=%12s" % (self.
name, self.
symbol, self.
comm, self.
dso)
56 def __init__(self, name, comm, dso, symbol, raw_buf, ev_type=EVTYPE_PEBS):
58 flags, ip, ax, bx, cx, dx, si, di, bp, sp = struct.unpack(
'QQQQQQQQQQ', tmp_buf)
70 PerfEvent.__init__(self, name, comm, dso, symbol, raw_buf, ev_type)
71 PebsEvent.pebs_num += 1
85 def __init__(self, name, comm, dso, symbol, raw_buf, ev_type=EVTYPE_PEBS_LL):
86 tmp_buf=raw_buf[144:176]
87 status, dla, dse, lat = struct.unpack(
'QQQQ', tmp_buf)
93 PebsEvent.__init__(self, name, comm, dso, symbol, raw_buf, ev_type)
94 PebsNHM.pebs_nhm_num += 1
def create_event(name, comm, dso, symbol, raw_buf)
def __init__(self, name, comm, dso, symbol, raw_buf, ev_type=EVTYPE_GENERIC)
def __init__(self, name, comm, dso, symbol, raw_buf, ev_type=EVTYPE_PEBS_LL)
def __init__(self, name, comm, dso, symbol, raw_buf, ev_type=EVTYPE_PEBS)