[llvm-exegesis] Uops mode isnćt working

I’ve been testing llvm-exegesis on X86. Latency and inverse_throughput modes work fine but when I run uops I get an error:

event not found - cannot create event uops_dispatched_port:port_0
LLVM ERROR: invalid perf event ‘uops_dispatched_port:port_0’

I’m running this on a i7-4790K. Am I missing something on my computer or is this not yet fully implemented?

This also affects the llvm-exegesis lit tests and they all get skipped becuse the configuration script determines that uops doens’t work. This could be changed so that the tests still run the modes that work (latency and inverse_throughput in my case).


That means the pfm counters are not specified correctly for that CPU.
You'll need to patch X86PfmCounter.td
Please do submit that patch to https://reviews.llvm.org/ afterwards!


Thanks Roman,

To elaborate a bit, you can tell which host CPU llvm detected by looking at the cpu_name field in llvm-exegesis output for latency, something like:

cpu_name: haswell

And check that this one has a PfmCountersBinding in X86PfmCounter.td, and that it’s correct.

Thank you everyone. I found it and submitted the patch: https://reviews.llvm.org/D71665.