[LLVMdev] Measuring performance overhead

Andrew Lenharth alenhar2 at cs.uiuc.edu
Sun Feb 27 05:48:22 PST 2005


On Sat, 2005-02-26 at 22:34 -0600, Chris Lattner wrote:
> On Sat, 26 Feb 2005, Tanu Sharma wrote:
> 
> > Thanks for the reply :-)
> > I am actually looking for ways to determine "size" of code segment when the program is in native code.
> > Any suggestions to do that ?
> 
> Compile it with llvm to a native .o or .exe file, then run 'size' on it?
> 
> E.g.:
> 
> llvm-gcc x.c -o a.out -Wl,-native
> size ./a.out

objdump -h a.out

and add the size columns for all sections marked with "CODE"?

Andrew Lenharth




More information about the llvm-dev mailing list