Profiling tools?
Nathan Meyers
nmeyers@teleport.com
Thu Sep 9 20:09:00 GMT 1999
Matt Welsh wrote:
>
> Hi all,
>
> Does anyone have any experience with using profiling tools (e.g., gprof)
> with gcj-compiled Java programs?
I have a project that could probably be turned into something you could
use. No time for me to attack it at the moment, but you're welcome to
try.
On my open source page, http://www.teleport.com/~nmeyers/FreeWare ,
there's a native tool called Profiler. It's a native profiler,
implemented with the libc profil(3) call and packaged with the JVMPI
interface for use as a profiler with JDK1.2.
It has no real dependence on JDK1.2 - it just takes advantage of a nice
interface for plugging in profilers. It currently configures itself to
profile the chunk of address space occupied by the shared libraries -
where almost everything interesting happens under the JDK. With a bit of
creative replumbing - figuring out the right part of address space to
profile, calling the start and stop code yourself (or adding _init() and
atexit() behaviors) - it could be turned into a profiling tool for
native applications, gcj and otherwise. It should work as long as nobody
else in the process is using the profiling timer.
The code is GPL'd, and you're welcome to give it a try.
Nathan Meyers
nmeyers@teleport.com
More information about the Java
mailing list