From d78e8a166537c9ceab4f2e901dc96c53667a2174 Mon Sep 17 00:00:00 2001 From: Ed Baker Date: Wed, 4 Dec 2024 14:25:50 -0700 Subject: [PATCH] create_perf_json: Drop UMaskExt depending on FCMask and PortMask This commit unsets UMaskExt for events which also set PortMask and FCMask. --- scripts/create_perf_json.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/create_perf_json.py b/scripts/create_perf_json.py index 509b689e..3139a91d 100755 --- a/scripts/create_perf_json.py +++ b/scripts/create_perf_json.py @@ -327,6 +327,13 @@ def get(key: str) -> str: if self.umask: self.umask = self.umask.split(",")[0] umask_ext = get('UMaskExt') + + # Unset UMaskExt if PortMask or FCMask are set. For future platforms + # PortMask and FCMask won't be present and only UMaskExt will be available. + if umask_ext and int(umask_ext, 16): + if (self.port_mask and int(self.port_mask, 16)) or (self.fc_mask and int(self.fc_mask, 16)): + umask_ext = None + if umask_ext: self.umask = umask_ext + self.umask[2:] self.umask = f'0x{int(self.umask, 16):x}'