Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > How to profile C++ programs in Linux

Reply
Thread Tools

How to profile C++ programs in Linux

 
 
zhouchengly@gmail.com
Guest
Posts: n/a
 
      01-25-2007
Hi all:
How to profile C++ programs in Linux? could you give me some
advice?
Appreciate your help!

 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      01-25-2007
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.
 
Reply With Quote
 
 
 
 
Amit Gupta
Guest
Posts: n/a
 
      01-25-2007
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!


 
Reply With Quote
 
Mehturt@gmail.com
Guest
Posts: n/a
 
      01-25-2007

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 -.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
<profile><properties> with no Profile class Steven ASP .Net 5 10-24-2008 07:23 PM
Visual Studio 2008 asp.net web administration>profile: "The profile wasn't created"? Andy B ASP .Net 0 05-03-2008 05:15 PM
Want to profile monitor for Fuji Frontier ICC profile? Lynn Digital Photography 9 09-08-2005 12:17 PM
Java Web Start app icons keep going in user profile not All Users profile Brad Java 1 07-19-2005 02:10 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57