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 ? Tanu Chris Lattner <sabre at nondot.org> wrote: 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 sameI'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/ _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev --------------------------------- Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. Learn more. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050226/befec748/attachment.html>
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 -Chris> Chris Lattner <sabre at nondot.org> wrote: > 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 > >-Chris -- http://nondot.org/sabre/ http://llvm.cs.uiuc.edu/
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.outobjdump -h a.out and add the size columns for all sections marked with "CODE"? Andrew Lenharth