๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.os.linux.ubuntu
4 messages
4 total messages Started by Ignoramus11615 Thu, 05 Nov 2009 20:59
Profiling under Linux
#106
Author: Ignoramus11615
Date: Thu, 05 Nov 2009 20:59
15 lines
1741 bytes
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. 

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 use -O3 and g++-4.2

Thanks
Re: Profiling under Linux
#107
Author: 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
Re: Profiling under Linux
#108
Author: Jeff Schwab
Date: Fri, 06 Nov 2009 02:32
10 lines
1789 bytes
Ignoramus11615 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.

I've had success with oprofile.  It requires root.
Re: Profiling under Linux
#109
Author: Ignoramus11615
Date: Fri, 06 Nov 2009 02:51
34 lines
2573 bytes
On 2009-11-05, Ji?? Pale?ek <jpalecek@web.de> wrote:
> 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.

Sorry, I meant the Linux program is slower.

i

> Regards
>      Jiri Palecek
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads