Can hardware performance counters decrease when using perf stat?

I take temporary measures with perf stat with the command:

$ perf stat -x, -I 100  -oout.txt -e cache-misses:u find / -name file

Samples do not always increase. Some measures are lower than the previous ones. Here is an example:

0.100225621,1103127,cache-misses:u
0.200583165,1098697,cache-misses:u
0.300825858,1093229,cache-misses:u
0.401061818,1307353,cache-misses:u
0.501293039,1271823,cache-misses:u
0.601531048,968170,cache-misses:u
0.701913069,986001,cache-misses:u
0.802181430,1080398,cache-misses:u
0.902453753,1312237,cache-misses:u
1.002721050,1276197,cache-misses:u
1.102988175,1263220,cache-misses:u
1.203292647,1201003,cache-misses:u
1.228879941,275942,cache-misses:u

The first dimension is 1103127, and the second is 1098697, which is smaller than the previous one.

Is this a basic mistake or has any explanation?

+4
source share
1 answer

It is impossible to see from your message whether it is -l100 (l for love) or -I100 (I for interval). I guess this is the last. If so, then from the man page he says that he is printing count deltas .

 
-I msecs, --interval-print msecs
           Print count deltas every N milliseconds (minimum: 100ms) example:
           perf stat -I 1000 -e cycles -a sleep 5
+5

All Articles