473,405 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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!

Jan 25 '07 #1
3 5079
zh*********@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.
Jan 25 '07 #2
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!
Jan 25 '07 #3

zh*********@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 -.

Jan 25 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Benny Hill | last post by:
I have a website (running on a linux machine) that currently makes use of JSP to access data on an AS/400. I've found information telling me that after setting up ODBC drivers on the linux...
15
by: Marc Le Roy | last post by:
Hello, ADA Ravenscar is a restricted subset of the ADA language that has been defined for real-time software development in safety critical applications. Completed with additional restrictions...
10
by: Jean-David Beyer | last post by:
I have some programs running on Red Hat Linux 7.3 working with IBM DB2 V6.1 (with all the FixPacks) on my old machine. I have just installed IBM DB2 V8.1 on this (new) machine running Red Hat...
2
by: kernel.lover | last post by:
Hello, I have UDP socket programs. I want to run server socket on one machine and client socket on another and viceversa. How can i create a flexibility at each system so that it will not only...
2
by: Allan Adler | last post by:
In C, I can execute system("gs gleep.ps"); and have C run a ghostscript program gleep.ps, which might ask for user input and, when it gets it, take some actions and report back to the C...
3
by: Bo Peng | last post by:
Dear list, I have a C++-SWIG-wrapped python module. The running time for one of the functions is pretty unpredictable so I would like to profile it. However, the python profiler does not seem to...
55
by: Steve | last post by:
I have to develop several large and complex C++ hardware test programs that should work under DOS, most likely with 32-bit DOS extender. Development workstation OS would be Microsoft XP. Quite some...
20
by: Guy Fawkes | last post by:
Hi, I was wondering if Python programs always need to include the source code with the program itself. I'm asking this because I don't want my program to be open-source and so far all the Python...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.