This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Profiling gcj code with gprof?




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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]