This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Profiling gcj code with gprof?
- To: Bill Bland <wjb at netpd dot com>
- Subject: Re: Profiling gcj code with gprof?
- From: Jeff Sturm <jsturm at one-point dot com>
- Date: Fri, 9 Nov 2001 11:55:47 -0500 (EST)
- cc: java at gcc dot gnu dot org
On Fri, 9 Nov 2001, Bill Bland wrote:
> 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?).
In my experience gprof just doesn't work with multithreaded programs. A
couple of tools that have been mentioned here are sprof and cprof. The
former is part of GNU libc; the latter can be found at:
http://opensource.corel.com/cprof.html
I have very little experience with either. Bryce reported some
success with sprof and recent builds. There is a FAQ entry for this:
http://gcc.gnu.org/java/faq.html#5_6
The FAQ should really be expanded with better information as we get it.
Jeff