From 998aef21732d5a6c791275c7697281d7ac76246e Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Tue, 12 Nov 2024 09:33:32 -0800 Subject: [PATCH] ocperf: Fix eventsel_mask & flame --- ocperf.py | 2 +- pmudef.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ocperf.py b/ocperf.py index e403dbf4..018587d1 100755 --- a/ocperf.py +++ b/ocperf.py @@ -298,7 +298,7 @@ def output_newstyle(self, extra="", noname=False, period=False, name="", noexplo if self.pname: e = self.pname else: - e = "event=0x%x,umask=0x%x" % (val & 0xff, + e = "event=0x%x,umask=0x%x" % (val & 0xff, ((val >> 8) & 0xff) | (((val >> 40) & 0xff) << 8)) e += extra if version.has_name: diff --git a/pmudef.py b/pmudef.py index a8b00302..f18e6adb 100644 --- a/pmudef.py +++ b/pmudef.py @@ -7,7 +7,7 @@ EVENTSEL_INV = 1<<23 EVENTSEL_EQ = 1<<36 EVENTSEL_INTX = 1<<32 -EVENTSEL_INTX_CP = 1<33 +EVENTSEL_INTX_CP = 1<<33 EVENTSEL_CMASK = 0xff000000 EVMASK = (EVENTSEL_EVENT | EVENTSEL_UMASK | EVENTSEL_EDGE | EVENTSEL_PC | EVENTSEL_ANY |