octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Profiling Octave


From: Paul Thomas
Subject: Re: Profiling Octave
Date: Thu, 25 Mar 2004 09:48:05 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Clinton Chee wrote:

Hi Paul, Ben, others,

From Paul's recent email see below, I get the impression that octave can be compiled with gprof (-pg). However, when I build octave, it compiles successfully (I think) with the -pg but when I run it, I get:

/home/chee/programs/octave-2.1.57$>src/octave
panic: Profiling timer expired -- stopping myself...
Profiling timer expired

Clinton,

I have to confess to having blundered around somewhat to arrive at a build that worked and depended on helpful remarks from others to get there. Also, although it should not make any difference, Ben and I were working under Cygwin. I and, I rather think, Ben do not claim any expertise in setting up profiling under gcc.

That not withstanding, I will make one remark: We could not get the build with -pg to complete with shared enabled. The linker complained of an unrequited reference to __monstartup which is to be found in gcrt1.o. Looking at the specs file for gcc-3.2.2 on RH9, there appears to be a similar exclusion:

*startfile:
%{!shared: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:%{profile:gcrt1.o%s} %{!profile:crt1.o%s}}}} crti.o%s %{static:crtbeginT.o%s} %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}

This prevents gcrt1.o from being loaded unless share is disabled. We took this at face value and satisfied the reference by doing just that. The other approach would be to link gcrt1.o explicitly. I have no idea if this will work or not.

Note also, it is necessary to set -pg in the compile and the link steps.

A final remark concerns the profiling output; whilst there appears to be reasonable proportionality between the reported times and the elapsed cputime, in absolute terms it is out by a factor of a few. I have no idea, therefore, of how much trust can be placed in the profiling. I am exploring this with a smaller, simpler code before returning to octave.

Paul T




reply via email to

[Prev in Thread] Current Thread [Next in Thread]