Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.
1787 Discussions

what is the rule for creating the raw encoding of a perfmon event with 2 event selectors

rg125
Beginner
1,161 Views

I have a sapphire rapids server. I'm interested is monitoring the perfmon event OCR.HWPF_L1D.ANY_RESPONSE. The associated information is

EventSel={2AH,2BH} UMask=01H MSR_OFFCORE_RSPx{1A6H,1A7H}=10400H

If this had 1 event selector the raw encoding would be "r", followed by the Umask followed by the EventSelector. But this event shows 2 event selectors, {2AH,2BH}. perf doesn't recognize  OCR.HWPF_L1D.ANY_RESPONSE  as a valid event, as seen below:

perf stat -e OCR.HWPF_L1D.ANY_RESPONSE  sleep 1

event syntax error: 'OCR.HWPF_L1D.ANY_RESPONSE'

                     \___ parser error

Run 'perf list' for a list of valid events

Thus I need the raw encoding. What would it be?

0 Kudos
1 Reply
rg125
Beginner
814 Views

So far, no one has been able to answer my question, but there is an answer since this counter is now accessible by perf in Linux 6.10 .   I haven't had time to study the source code of perf to see how it's done, but the really good news is that it's not necessary to know the raw encoding for OCR.HWPF_L1D.ANY_RESPONSE  since it is one of the 86 offcore events that perf, in Linus 6.10, can access by its name.  In Linux 6.8, which I had been using until recently, perf only knew about 50 offcore events and OCR.HWPF_L1D.ANY_RESPONSE was not one of them.  perf has certainly come a long way from where it was in the Linux 4 and Linux 5 days.

Reply