I am struggling with a variable creation/access issue. What I am trying to do is to create a new method level local variable that will track an identifier assigned to a method to help track the entry and exit of methods for profiling and tracing. The source code is below, but what I am seeing is that the new variable falls out of scope immediately after it is used for the first time. When the exit code is generated, the reference to the new variable is no longer valid. Can someone please help me identify what I am doing wrong? The long term for this is to create an agent that can instrument a
java application to allow for quick, low impact determination of resource hogs.
Class that inserts the bytecode:
Class Visitor:
Transformer:
Premain:
Class that contains the static calls:
Thanks for any help,
0x
Insanity: Doing the same thing over and over again and expecting the same results in a multithreaded application.