Add -pg to your compile/link line.
when you run your code (the program should terminate normaly and not crash!) a gmon.out file will be created.
do: gprof <application name>
and there you have it
Hayim.
On Tue, 22 Mar 2005, suresh ds wrote:
Is there any default profiler available for linux (which gets installed alongwith linux)? If so, can anyone tell me the name and the command to invoke it?
OR
Do I have to separately download and install it in linux? In this case, which is the best profiler for linux and where it is available(website)?
Also, I want to know whether it runs in both user mode and kernel mode.
Expecting answers...
thanks suresh
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/