Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   How to profile C++ programs in Linux (http://www.velocityreviews.com/forums/t460043-how-to-profile-c-programs-in-linux.html)

zhouchengly@gmail.com 01-25-2007 09:05 AM

How to profile C++ programs in Linux
 
Hi all:
How to profile C++ programs in Linux? could you give me some
advice?
Appreciate your help!


Ian Collins 01-25-2007 09:08 AM

Re: How to profile C++ programs in Linux
 
zhouchengly@gmail.com wrote:
> Hi all:
> How to profile C++ programs in Linux? could you give me some
> advice?

Ask in a Linux programming group, we only do C++ language questions here.

--
Ian Collins.

Amit Gupta 01-25-2007 09:43 AM

Re: How to profile C++ programs in Linux
 
What do you want to profile? (security/speed/power/memory?)

For runtime/memory....
you can use quantify/purify to do code-profiling for some input
data-set.
Or, valgrind/cachegrind are free opensource tools (for input data-set).

I am not sure, if any static formal code-profiler exist, that can run
industrial grade c++ code.

On Jan 25, 1:05 am, "zhouchen...@gmail.com" <zhouchen...@gmail.com>
wrote:
> Hi all:
> How to profile C++ programs in Linux? could you give me some
> advice?
> Appreciate your help!



Mehturt@gmail.com 01-25-2007 09:50 AM

Re: How to profile C++ programs in Linux
 

zhouchengly@gmail.com wrote:
> Hi all:
> How to profile C++ programs in Linux? could you give me some
> advice?
> Appreciate your help!


When using g++, you can compile and link with -pg and then use gprof.
Run the program, it creates gmon.out upon exit. Then do gprof ./binary
../gmon.out | vim -.



All times are GMT. The time now is 11:04 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.