[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: profiling Octave
From: |
Rik |
Subject: |
Re: profiling Octave |
Date: |
Fri, 9 Aug 2019 11:30:37 -0700 |
On 08/08/2019 09:50 PM, John W. Eaton wrote:
> On 8/9/19 12:30 AM, Rik wrote:
>> jwe,
>>
>> I wanted to look to look empirically at the slow down that has occurred
>> over time with Octave.
>>
>> I tried oprofile first, but even with some tweaking of the sampling
>> frequency I couldn't get high enough resolution to really see what needs to
>> be optimized.
>>
>> Since we're using GNU tools I thought I would just instrument the code by
>> compiling with -pg and then use gprof to examine things. But, run-octave
>> quits immediately with "Profiling time alarm". I suspect it is something
>> to do with uncaught signals and the way that the octave wrapper forks
>> immediately.
>>
>> As a final stab I tried Callgrind with 'run-octave -callgrind' but the
>> resulting log file is completely empty. Probably, again, because it is
>> tracking the wrapper that forks rather than the true executable.
>>
>> Any ideas?
>
> If you are just looking at the interpreter speed and not the GUI, can you
> try the profiling tools with octave-cli? It doesn't fork at startup.
>
Thanks, that helps.
With Callgrind, I can now get some results, although it is 70X slower than
the code running by itself so I can't do extensive tests.
When I run with gprof, there still seems to be an issue. The flat profile is
% cumulative self self total
time seconds seconds calls Ts/call Ts/call name
0.00 0.00 0.00 2 0.00 0.00
__gnu_cxx::__enable_if<std::__is_char<char>::__value, bool>::__type
std::operator==<char>(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&,
std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)
0.00 0.00 0.00 1 0.00 0.00 octave_hg_id[abi:cxx11]()
0.00 0.00 0.00 1 0.00 0.00 main
for "gprof -p src/.libs/octave-cli".
This does seem to correspond with main-cli.cc which only contains main()
and the function check_hg_versions(). Is there another image file I can
give gprof?
--Rik
> jwe
>
>
>
>
- profiling Octave, Rik, 2019/08/09
- Re: profiling Octave, John W. Eaton, 2019/08/09
- Re: profiling Octave,
Rik <=
- Re: profiling Octave, Andreas Weber, 2019/08/09
- Re: profiling Octave, Carnë Draug, 2019/08/09
- Re: profiling Octave, Dmitri A. Sergatskov, 2019/08/09
- Re: profiling Octave, Rik, 2019/08/09
- Re: profiling Octave, Dmitri A. Sergatskov, 2019/08/09
- Re: profiling Octave, Rik, 2019/08/10
- Re: profiling Octave, Dmitri A. Sergatskov, 2019/08/10
- Re: profiling Octave, Daniel J Sebald, 2019/08/11
- Re: profiling Octave, Rik, 2019/08/12
- Re: profiling Octave, Daniel J Sebald, 2019/08/13