This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Profiling gcj code with gprof?
- To: java at gcc dot gnu dot org
- Subject: Profiling gcj code with gprof?
- From: Bill Bland <wjb at netpd dot com>
- Date: Fri, 9 Nov 2001 10:43:55 +0000 (GMT)
- Reply-To: wjb at netpd dot com
Hello,
I have a java/c++ based program built using g++3.0.1 and gcj3.0.1
The program is working well now, thanks to previous help from people on
this list, and now that I'm using a recent version of gdb I can even debug
the different threads properly - cool!
My current problem is profiling - the code is just running a little too
slow. I've started passing the -pg switch to g++ and gcj and I get a
gmon.out file when the program exits. Now gprof will load up this file
and display statistics but they appear to be incomplete (or I've forgotten
to do something perhaps?).
The header says:
Flat profile:
Each sample counts as 0.01 seconds.
no time accumulated
Each function then gets listed, with the number of times it has been
called (this field looks correct to me) but all the fields to do with time
(%, cumulative, etc.) are 0.00. Given that my program takes, on average,
around 370 seconds to go through the input I'm using to test it, these
can't possibly be correct!
I've probably just done this completely wrong - I haven't been using the
gnu tools for long yet (but I love them already - not sure how I
ever managed without gdb ;-). If this is the case could some kind soul
please tell me what? I'd be grateful for any suggestions.
Thanks an advance for your help.
Best wishes,
Bill.