How to profile C++ programs in Linux

Z

zhouchengly

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

Ian Collins

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

Amit Gupta

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

Mehturt

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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top