[LLVMdev] How to measure the overhead of instrumented code

Caldarale, Charles R Chuck.Caldarale at unisys.com
Mon Feb 25 09:23:13 PST 2013


> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of John Criswell
> Subject: Re: [LLVMdev] How to measure the overhead of instrumented code

> > To measure the pressure of instruction cache, I want to replace the instrumented
> > source code as nop (with length equals the length of instrumented source code). 

> If you know the length of your instrumentation in bytes, you could generate 
> inline assembly code that inserts the correct number of NOP instructions.

Except that current Intel CPUs include a micro-op cache, where the NOPs pretty much disappear; this is no longer a simple problem.  VTune or PAPI are your best bet.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.





More information about the llvm-dev mailing list