I'm using valgrind --tool=callgrind
to profile a critical part of my C++ program.
The part itself takes less that a microsecond to execute so I'm profiling over a large number of loops over that part.
I noticed that instructions take multiples of 0.13% time to execute (percentage out of program total time to execute). So I only see 0.13, 0.26, 0.52, so on.
My question is, should I assume that this atomic quantity measures a CPU cycle? See photo.
(The callgrind
output is presented graphically with kcachegrind
.)
Edit: By the way, looking at machine code, I see mov
takes 0.13 so that's probably a clock cycle indeed.