X86 performance monitoring

Roberto Ragusa mail at robertoragusa.it
Thu Nov 5 19:51:49 UTC 2009


Frank Cox wrote:
> My brother just sent me this inquiry and I thought I would ask here to see if
> any of you lot know anything about this before I send him a reply.
> 
> Just checking whether you know anything about the various packages
> I could use to monitor performance of code running on X86 processors.
> I want to measure things like:
>    - instructions executed, in a block of code (ie., from here to there)
>    - cache misses (i-cache, d-cache, L1, L2, etc)
>    - processor cycles
>    - SSE4 instructions executed
>    - ... and so on.

While not precisely related to your question, you could have a look
at valgrind, which has a simulation mode for this kind of statistics.
It will not be real data, but if you just want to estimate if this
functions costs more than that one and if this change is an optimization
or not, it is quite good.
With proper options it gives you impressing data which you can explore
with kcachegrind.
When examining code in this way it easily happens you discover
unbelievable places where a lot of CPU is spent.

The good part is that you do not have to recompile your kernel or
your application.

Best regards.
-- 
   Roberto Ragusa    mail at robertoragusa.it




More information about the fedora-list mailing list