How to profile C++ programs in Linux

Discussion in 'C++' started by zhouchengly@gmail.com, Jan 25, 2007.

  1. Guest

    Hi all:
    How to profile C++ programs in Linux? could you give me some
    advice?
    Appreciate your help!
     
    , Jan 25, 2007
    #1
    1. Advertising

  2. Ian Collins Guest

    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.
     
    Ian Collins, Jan 25, 2007
    #2
    1. Advertising

  3. Amit Gupta Guest

    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, "" <>
    wrote:
    > Hi all:
    > How to profile C++ programs in Linux? could you give me some
    > advice?
    > Appreciate your help!
     
    Amit Gupta, Jan 25, 2007
    #3
  4. Guest

    Re: How to profile C++ programs in Linux

    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 -.
     
    , Jan 25, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brad
    Replies:
    1
    Views:
    1,151
    Roedy Green
    Jul 19, 2005
  2. Replies:
    12
    Views:
    1,672
    Dave Thompson
    Jan 10, 2005
  3. Andy B
    Replies:
    0
    Views:
    537
    Andy B
    May 3, 2008
  4. Steven
    Replies:
    5
    Views:
    501
    Steven
    Oct 24, 2008
  5. PerlFAQ Server

    FAQ 3.6 How do I profile my Perl programs?

    PerlFAQ Server, Mar 4, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    226
    PerlFAQ Server
    Mar 4, 2011
Loading...

Share This Page