Function Profiling
hi,
I have created one project in eclipse. I have updated my eclipse with Test and Performance Tools Platform (TPTP) tool. Now I got Profiling and Logging option. While trying to create profile configuration, java application is available but there is no option for C/C++. 1. Is possible to do function profiling for c code in Eclipse? 2. In profiling configuration one of the option is there Attach to agent, in that how can add agent? thanks, |
No idea about profiling out of eclipse for c/c++ programms. However, you could try to compile your progamme on the command line. Just add '-ggdb -pg' to the compiler options. This will create a binary with profiling enabled.
When you run your programm and let it quit in a proper way, you will get a 'gprof.out' file in the CWD. You can examine this file with gprof like so: gprof 'YOUR_BINARY' gprof.out This will dump the function profiling data to STDOUT. |
hi traene,
thanks, i was compile successfully.but error is coming while try to creating exe. pls give some more details abt this |
hi,
while compiling gmon.out file is creating. but how can open that one. |
Basically, its what i stated:
Code:
gprof 'YOUR_BINARY' gprof.out http://www.cs.utah.edu/dept/old/texi...gprof_toc.html Additionaly try info / man pages for gprof. |
hi traene,
thanks. now i getting correct result. that link is very useful for function profiling. thanks a lot. |
All times are GMT -5. The time now is 10:28 AM. |