How do profilers work?
Lo,
How do code profilers like Intel's VTune profile the code? Do they instrument the code with timers etc. automatically, and if so, how? I know GNU gprof is a good free software profiler, is it a typical example of a profiler?
I've always been interested in how they work, and the detail of VTune surprises me.
CloudNine
There essentially are 2 ways to do profiling:
a) intrusive (place timers in code)
b) statistical (every x cycles check location in code)
Usually statistical profiling is what you want to use because it shows the behaviour of the real code.
a) intrusive (place timers in code)
b) statistical (every x cycles check location in code)
Usually statistical profiling is what you want to use because it shows the behaviour of the real code.
You can also do it through simulation, which VTune does as well as the above. By this I mean analysing the code for potential stalls and such like.
Skizz
Skizz
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement