473,769 Members | 2,044 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Profiling multithreaded C++ code

Hello all,

I'm looking for some input on the best tools to use for profiling
multithreaded C++ code developed on GNU/Linux and compiled using
gcc-3.1. More specifically, the distro in use is RH 7.2 running
kernel 2.4.7 with SMP. The box has dual processors.

Some of the options I've found are
gprof - standard GNU profiler that comes with gcc. The biggest
problem with this is that it does not support multithreading or
multiprocessors . There's a workaround for the multithreading support,
but I'm not very confident in it's accuracy.

cprof - this was something developed by Corel for profiling wine.
AFAIK, it is no longer developed or supported. I've been able to find
very little on it other than old posts in mailing lists and news
groups.

tau - seems the best that I've seen so far. It's a little more
complicated than the others and requires you to add support to the
code (which sucks 'cause our code base is several 100's of thousands
of lines of code). It does seem to be the most thorough and the most
maintained of the others.

FunctionCheck - also seems to be very good. It doesn't require any
code modifications and was written explicitly to make up for the
limitations of gprof. It seems as though development has been halted
for about a year and I had some problems during compilation, but
otherwise it seems like it will get the job done. This is the way I'm
leaning ATM.

These are all open source tools. I'd like to stick to that, but if
someone has a proprietary tool that they think just blows everything
else out of the water, I'd like to hear about it.

Also, if anyone has any experience, good or bad, with the above
mentioned profilers let me know.

Thanks for your input,
Richard Wallace
Jul 19 '05 #1
3 10982
On 8 Jul 2003 10:28:51 -0700, ri************* @specastro.com (Richard
Wallace) wrote in comp.lang.c++:
Hello all,

I'm looking for some input on the best tools to use for profiling
multithreaded C++ code developed on GNU/Linux and compiled using
gcc-3.1. More specifically, the distro in use is RH 7.2 running
kernel 2.4.7 with SMP. The box has dual processors.


[snip]

Take this to the Linux groups in the news:comp.os.li nux.development .*
family.

We discuss the C++ language here, which does not define GNU, threads,
Red Hat, etc., so it's all off-topic.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.l earn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Jul 19 '05 #2

Richard Wallace wrote:

Hello all,

I'm looking for some input on the best tools to use for profiling
multithreaded C++ code developed on GNU/Linux and compiled using
gcc-3.1. More specifically, the distro in use is RH 7.2 running
kernel 2.4.7 with SMP. The box has dual processors.


You might want to take a look at:

http://www.intel.com/software/products/vtune/vlin/
(VTune for Linux)

http://h21007.www2.hp.com/dspp/tech/...3,5072,00.html
(Visual Threads for Linux)

regards,
alexander.

--
http://www.ibm.com/servers/eserver/linux/fun
Jul 19 '05 #3
You can download an eval version of VTune for Linux at
http://www.intel.com/software/produc.../vlin/eval.htm. Also,
there is a VTune for Linux user-to-user forum at
http://intel.forums.liveworld.com/forum.jsp?forum=136 where VTune
users and VTune engineers discuss different applications.
ri************* @specastro.com (Richard Wallace) wrote in message news:<e6******* *************** ****@posting.go ogle.com>...
Hello all,

I'm looking for some input on the best tools to use for profiling
multithreaded C++ code developed on GNU/Linux and compiled using
gcc-3.1. More specifically, the distro in use is RH 7.2 running
kernel 2.4.7 with SMP. The box has dual processors.

Some of the options I've found are
gprof - standard GNU profiler that comes with gcc. The biggest
problem with this is that it does not support multithreading or
multiprocessors . There's a workaround for the multithreading support,
but I'm not very confident in it's accuracy.

cprof - this was something developed by Corel for profiling wine.
AFAIK, it is no longer developed or supported. I've been able to find
very little on it other than old posts in mailing lists and news
groups.

tau - seems the best that I've seen so far. It's a little more
complicated than the others and requires you to add support to the
code (which sucks 'cause our code base is several 100's of thousands
of lines of code). It does seem to be the most thorough and the most
maintained of the others.

FunctionCheck - also seems to be very good. It doesn't require any
code modifications and was written explicitly to make up for the
limitations of gprof. It seems as though development has been halted
for about a year and I had some problems during compilation, but
otherwise it seems like it will get the job done. This is the way I'm
leaning ATM.

These are all open source tools. I'd like to stick to that, but if
someone has a proprietary tool that they think just blows everything
else out of the water, I'd like to hear about it.

Also, if anyone has any experience, good or bad, with the above
mentioned profilers let me know.

Thanks for your input,
Richard Wallace

Jul 19 '05 #4

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

Similar topics

2
6641
by: pradyumna | last post by:
In Project settins - C/C++ - Code Generation, what is the difference between the option "Multithreaded" and "Multithreaded DLL". I understand that on selecting multithreaded option, single and multithreaded applications can both use that dll, but what about multithreaded DLL option. Thanks
2
2165
by: AdamM | last post by:
What tool can I use to see where my C# code is spending most of it's cycles for the purpose of optimizing it? Thanks in advance!
1
1419
by: Peter | last post by:
Hi, I'm looking to find out more about profiling my code. Are the any free profiling solutions out there, or free microsoft tools that will help me profile my code? ANy recommendations. -Peter
3
2601
by: groups | last post by:
Hi all, I've recently ported a rather large C application to run multithreaded. A few functions have seriously deteriorated in performance, in particular when accessing a rather large global array, that contains information that is shared among threads. Any idea, why the lines accessing this global array now take about 50x longer in the multithreaded application?
2
1500
by: Andreas Røsdal | last post by:
Hi, I'm using the Python profiler to optimize a pathfinding algorithm of a game, and would like some help from someone who knows how to improve the performance of Python code. The algorithm is A-Star, and it works correctly. However, the interface that I made between the A-Star pathfinding algorithm and the map data structure is what I've found to be a bottle-neck so far. As a start, I'd like to optimize the methods with the highest...
7
2820
by: Kai Zhu | last post by:
Can anybody show me a list of such tools so that I can pick up the tools match my requirement.
7
3915
by: horacius.rex | last post by:
Hi, I want to profile a C program I am writting, so I compile it with -pg options and use gprof to obtain information about call graphs, which I am really interested in. I look at the text files but when I have a large number of functions, it looks really embarrasing. So somebody recommended me about graphviz. My problem was to find something to convert between gprof format and graphviz .dot format. I finally found gprof2dot.py and ...
24
2526
by: David | last post by:
Hi list. What strategies do you use to ensure correctness of new code? Specifically, if you've just written 100 new lines of Python code, then: 1) How do you test the new code? 2) How do you ensure that the code will work correctly in the future? Short version:
9
1804
by: Peter Duniho | last post by:
I'm especially hoping Ben Voigt and/or Bob Powell see this (I saw their names on the m.p.d.f.performance newsgroup :) ) I would have posted to the performance newsgroup, but I see very little on there that actually seems to relate to the _tools_ per se while this newsgroup is actually somewhat related to the tools, and most of the useful answers come from people known to frequent this newsgroup anyway, so... :) My basic question: I...
0
9589
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10215
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8872
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5307
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3964
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.