andikleen / pmu-tools

Intel PMU profiling tools
GNU General Public License v2.0
1.98k stars 331 forks source link

Fix counter scheduling on ADL #455

Closed andikleen closed 11 months ago

andikleen commented 1 year ago

“RUN #8 of 9: Frontend_Bound Bad_Speculation Memory_Data_TLBs Fetch_Latency Machine_Clears ICache_Misses MS_Switches UopPI Fetch_Bandwidth perf stat -x\; -e '{cpu_core/event=0xd0,umask=0x42/,cpu_core/event=0x2a,umask=0x1,offcore_rsp=0x10800/,cpu_core/event=0x44,umask=0x1/,cpu_core/event=0x0,umask=0x3/,cpu_core/event=0x2a,umask=0x1,offcore_rsp=0x10003c0002/,cpu_core/slots/,cpu_core/event=0xc0,umask=0x0/,cpu_core/event=0xad,umask=0x10/,cpu_core/event=0x3c,umask=0x0/,cpu_core/event=0x80,umask=0x4/,cpu_core/event=0xc2,umask=0x4,frontend=0x8,cmask=1,edge=1/,cpu_core/event=0xae,umask=0x1/}' --percore-show-thread ./adobe-HQ.sh pgo2 HT1-rq31 Decoded 2250 ProRes frames in 4.24768s (529.701fps). 11 events not counted, 1 events not supported”

Except fixed counters, there are 10 events, but there are only 8 counters for big core.

aayasin commented 1 year ago

please notify @aayasin @amiri-khalil once fixed

andikleen commented 11 months ago

This should be fixed now. The problem is that the kernel doesn't correctly schedule OCR.* events (assumes they have to be on the first 4 counters like ICL), and this caused toplev to generate groups that didn't schedule. Now have a workaround and also reported the kernel bug for fixing.

@aayasin @amiri-khalil