[LLVMdev] Measuring performance overhead

Chris Lattner sabre at nondot.org
Fri Feb 25 11:55:30 PST 2005


On Fri, 25 Feb 2005, Tanu Sharma wrote:

>
> Hey,
>
> I have written a pass and wishes to measure its performance overhead 
> after running it over a program.I also wish to measure the size of code 
> segment once the program is in native code.What are the easy ways in 
> llvm to achieve this?Are there any tools available in llvm for the same

I'm not sure specifically what you want, but you should just be able to 
compile the program with and without your pass (e.g. you could add it to 
gccas/ld and add an option to enable or disable it).  Compile it both ways 
and compare the results?

> ?What exactly is this llvm-prof ?

llvm-prof is an interface to the a basic block, edge, and function 
profiler.  llvm-prof is just a front-end that formats profile data for 
human consumption.  If you look at the llvm/utils/profile.pl, you can play 
around with it.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.cs.uiuc.edu/




More information about the llvm-dev mailing list