uarch-bench
uarch-bench copied to clipboard
Some "two code" events aren't supported with libpfc
If you include on the command line:
--timer=libpfc --extra-events=FRONTEND_RETIRED.L1I_MISS
You'll see this output:
Event 'FRONTEND_RETIRED.L1I_MISS' resolved to 'skl::FRONTEND_RETIRED:L1I_MISS:k=1:u=1:e=0:i=0:c=0:t=0:intx=0:intxcp=0:fe_thres=0, short name: 'FRONTE' with code 0x5301c6
Event 'FRONTEND_RETIRED.L1I_MISS' resolved to 'skl::FRONTEND_RETIRED:L1I_MISS:k=1:u=1:e=0:i=0:c=0:t=0:intx=0:intxcp=0:fe_thres=0, short name: 'FRONTE' with code 0x12
WARNING: MULTIPLE CODES FOR 'FRONTEND_RETIRED.L1I_MISS'
The problem is that the FRONTEND_RETIRED.L1I_MISS
event needs programming of both the usual perf event select MSR (code 0x5301c6
) as well programming the special MSR_PEBS_FRONTEND
MSR with 0x12 (the second code) to implement the L1I_MISS
part. Without this, the event will do something unknown depending on the existing value of MSR_PEBS_FRONTEND (presumably).
An apparent workaround is to use perf stat -e
to record the event once - this sets the MSR_PEBS_FRONTEND
MSR, which I guess gets left alone after, and after that running uarch-bench
in the normal way without peft
appears to just work. Evidently not a good long term solution!