[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Profiling C++ code in oct files
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: Profiling C++ code in oct files |
Date: |
Wed, 8 May 2013 10:21:07 -0400 |
On 8 May 2013 07:20, Daniel Kraft <address@hidden> wrote:
> Is there a way to profile C++ code in .oct files? I tried passing
> CXXFLAGS="-pg <and standard ones>" to mkoctfile, but this is seemingly
> not enough. Executing the resulting .oct file through Octave doesn't
> produce a gmon.out.
I've never actually managed to get gprof working with Octave. I don't
know what the issue is, but I've tried to actually recompile all of
Octave, and while this does produce a gmon.out file, it's empty. I
don't know if the dlopen calls are confusing the instrumented code, or
what else could be happening.
There is an alternative to gprof that doesn't require instrumenting
the code: oprof. I don't find it very easy to use, it only works on
Linux, and you require root privileges to use it. I've used it a few
times for successfully profiling C++ code, not just Octave's
I am not sure if this is a solution for you.
- Jordi G. H.