I find the behavior of
perf top -e cache-misses:pp -p <my_pid> quite confusing. I own an Intel i5-3230M, running kernel 4.4.5 64 bit.
If I just run that commmand, I get basically no samples from my application (a numerical simulation with large datasets, so for sure it has to show cache misses), but almost only from some kernel functions such as
__intel_pmu_lbr_disable. If I limit the hits to user-space with
-K, I do get hits only in my application, but at a very low count. If I remove a "precise" (
p) modifier I get many more hits, but from opcodes that evidently don't cause memory load/writes.
How am I supposed to interpret this behavior? What exactly counts as "cache miss"?