Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: create_perf_json: Support 'FIXED' event codes #118

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions SKL/events/skylake_core.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"Events": [
{
"EventCode": "0x00",
"EventCode": "FIXED",
"UMask": "0x01",
"EventName": "INST_RETIRED.ANY",
"BriefDescription": "Instructions retired from execution.",
Expand All @@ -31,7 +31,7 @@
"Deprecated": "0"
},
{
"EventCode": "0x00",
"EventCode": "FIXED",
"UMask": "0x02",
"EventName": "CPU_CLK_UNHALTED.THREAD",
"BriefDescription": "Core cycles when the thread is not in halt state",
Expand All @@ -54,7 +54,7 @@
"Deprecated": "0"
},
{
"EventCode": "0x00",
"EventCode": "FIXED",
"UMask": "0x02",
"EventName": "CPU_CLK_UNHALTED.THREAD_ANY",
"BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
Expand All @@ -77,7 +77,7 @@
"Deprecated": "0"
},
{
"EventCode": "0x00",
"EventCode": "FIXED",
"UMask": "0x03",
"EventName": "CPU_CLK_UNHALTED.REF_TSC",
"BriefDescription": "Reference cycles when the core is not in halt state.",
Expand Down
8 changes: 8 additions & 0 deletions scripts/create_perf_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,14 @@ def get(key: str) -> str:
self.event_code = "0xff"
self.umask = None

# Unset event_code for fixed core counters. Example:
# "EventCode": "FIXED",
# "EventName": "INST_RETIRED.ANY",
# "Counter": "Fixed counter 0",
if "Counter" in jd and "fixed counter" in jd["Counter"].lower():
if str(self.event_code).lower() == 'fixed':
self.event_code = None

if self.filter:
remove_filter_start = [
"cbofilter",
Expand Down