I am looking for a BCI (Bytecode Instrumentation) library for Java in C or C++, to use in a JVMTI agent.
Best case scenario would be something like ASM or BCEL in pure C.
The closest thing I have found so far is only a demo java_crw_demo
written by Kelly O'Hair a few years ago and used in Sun's/Oracle's tutorials ever since.
Do you know of anything else?
Some rationale: I am building an instrumentation tool to add a getter method to
java.lang.Object
and overload this getter in every direct subclass ofObject
. For this reason I cannot use a Java agent. Also, I would like to avoid spawning a secondary JVM to perform the instrumentation - for complexity and speed reasons.