🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.os.linux.ubuntu
Article #107

Re: Profiling under Linux

#107
From: Jiří Paleček
Date: Thu, 05 Nov 2009 23:48
29 lines
2096 bytes
On Thu, 05 Nov 2009 21:59:40 +0100, Ignoramus11615  
<ignoramus11615@nospam.11615.invalid> wrote:

> I have a C++ program that is slower than I would like.
>
> I would like to use a profiler that would tell me in what functions is
> it spending the most actual time.
>
> gprof seems like an interesting tool, but I would like to know if
> there are other alternatives.

There are alternatives, among others:

  - oprofile, which gives coarse, but based on real performance data (taken  
 from the performance counters in the CPU)

  - valgrind --tool=callgrind, which gives very detailed data, which are  
however based on simulation

None of these require you to recompile the program.

> The issue is that I have a particular program that is slower under
> Windows than it is under Linux, and I want to know why that is the
> case.

I'm afraid profiling on Linux won't show you why it's slower on Windows.

Regards
     Jiri Palecek
Technical Details
Message-ID: <op.u2x4eolcu2flwt@debian>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!news.in2p3.fr!in2p3.fr!kanaga.switch.ch!switch.ch!kanja.arnes.si!news-hub.siol.net!newsfeed1.eu.ignite.net!news.cesnet.cz!news.felk.cvut.cz!not-for-mail
References: <wuWdnTL_0akhoW7XnZ2dnUVZ_g-dnZ2d@giganews.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 316e3c8591,677c89029c6d3971
X-Google-Attributes: gid316e3c8591,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!news.in2p3.fr!in2p3.fr!kanaga.switch.ch!switch.ch!kanja.arnes.si!news-hub.siol.net!newsfeed1.eu.ignite.net!news.cesnet.cz!news.felk.cvut.cz!not-for-mail
From: Jiří Paleček <jpalecek@web.de>
Newsgroups: alt.os.linux.ubuntu,comp.lang.c++,gnu.g++.help
Subject: Re: Profiling under Linux
Date: Fri, 06 Nov 2009 00:48:14 +0100
Organization: Czech Technical University
Lines: 29
Message-ID: <op.u2x4eolcu2flwt@debian>
References: <wuWdnTL_0akhoW7XnZ2dnUVZ_g-dnZ2d@giganews.com>
NNTP-Posting-Host: 144.172.broadband13.iol.cz
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
X-Trace: ns.felk.cvut.cz 1257461083 29289 90.180.172.144 (5 Nov 2009 22:44:43 GMT)
X-Complaints-To: usenet@news.felk.cvut.cz
NNTP-Posting-Date: Thu, 5 Nov 2009 22:44:43 +0000 (UTC)
User-Agent: Opera Mail/9.64 (Linux)