Using perf, is there a standard technique to collect stats (i-cache hit-rate, d-cache hit-rate, LLC hit-rate) at regular intervals of 1 millisecond?
Currently, I am using this command:
perf record -e instructions,\
L1-dcache-loads,L1-dcache-load-misses,L1-dcache-stores,L1-dcache-store-misses,\
L1-icache-load-misses,\
LLC-loads,LLC-stores \
-a -F 1000 sleep 1
This command collects 1000 samples every second and writes the data to perf.data file. I want to read the data stored in this file in this format:
Sample1: #i-cache hits #i-cache misses ...
Sample1: #i-cache hits #i-cache misses ...
However, perf report is showing all kinds of information that I do not need (fraction of time spent in kernel functions).
Is there a way to filter all this information and just focus on the phase information that I need? Is there a standard way to identify phases in a program execution?