CHANGE username to westes () wrote:
: Is there any public domain sample source code that shows how to instrument
: Java byte code in C++? We want to write a special-purpose profiler that
: would use the Java Profiling API hooks to give us an opportunity to
: instrument Java classes when they are loaded.
If you can live with GPL and C, my profiler, jmp, is available at
http://www.khelekore.org/jmp/
jmp uses the jvmpi profiling interface to do its work.
The hprof profiler has it source available (see jvmpi-documentation).
You could also look at fprofiler,
http://fprofiler.sourceforge.net/,
It uses the bcel to insert code into classes when they are loaded.
Im not sure what licence fprofiler uses, but since it is on
sourceforge it is an OSI approved licence.
/robo