gdanov
|
Posted: January 13, 2012 16:54 by gdanov
|
|
Hi, I am playing with BTrace using the btrace command line utility. I am interested to know what happens with the injected byte code when I terminate btrace. Are the instrumented classes reverted? Is my injected bytecode still lying around, inactive? The point is that I would like to use BTrace on production systems and want to know what is happening with the injected bytecode. Best Regards, Georgi |
what happens on btrace disconnect
Replies: 3 - Last Post: April 19, 2012 16:28
by: Jaroslav Bachorik
by: Jaroslav Bachorik
showing 1 - 4 of 4
Jaroslav Bachorik
|
Posted: January 15, 2012 18:45 by Jaroslav Bachorik
|
|
Hi, currently the BTrace code is deactivated but the generated classes as well as the instrumentation linger around. Probably we should look into this and find out a way how to remove the inactive BTrace code from the target JVM. -JB- |
Jaroslav Bachorik
|
Posted: April 19, 2012 16:28 by Jaroslav Bachorik
|
|
Hi Chandler, take a look at com.sun.btrace.agent.Client.onExit() method. There you can see that the particular BTrace bytecode transformer is being unregistered and the classes are retransformed, effectively removing all the instrumentation injected in this session. As I mentioned before the BTrace generated classes (artifacts generated for the compiled BTrace scripts) will hang around indefinitely as they are defined by the bootclassloader and will never get garbage collected. But their methods are virtually unreachable. -JB- |
Replies: 3 - Last Post: April 19, 2012 16:28
by: Jaroslav Bachorik
by: Jaroslav Bachorik







