Summary
1) Non-determinism is caused by a team change sleep 1not from predicting branching or other microarchitectural features.
2) You can find the number of instructions received using the hardware even counter, if your processor supports it. However, this will differ from the number of pending instructions (this is what usually executes commands for instructions).
Details:
sleep , . , , .
, instructions:u instructions:k . :
perf stat -e instructions:k,instructions:u,instructions sleep 1
:
Performance counter stats for 'sleep 1':
373,044 instructions:k
199,795 instructions:u
572,839 instructions
1.001018153 seconds time elapsed
Performance counter stats for 'sleep 1':
379,722 instructions:k
199,970 instructions:u
579,519 instructions
1.000986201 seconds time elapsed
, sleep 1 . . .