Sample Code That Instruments Java Byte Code?

  • Thread starter CHANGE username to westes
  • Start date
C

CHANGE username to westes

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.
 
R

Robert Olofsson

CHANGE username to westes ([email protected]) 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top