It would improve the ORB footprint and performance slightly to modify the tracing facility (TF) bytecode
instrumentation to modify ORB classes dynamically for phase II of the TF transformation.
Doing this requires using the redefineClasses method, which requires access to the Instrumentation API.
Unfortunately the only way to do this appears to be to use the attach API from tools.jar and
the VirtualMachine API. I suspect this is likely to be non-portable at some level, but fortunately GlassFish
has already dealt with the problem in the flashlight code. In fact, the public class
org.glassfish.flashlight.agent.ProbeAgentMain.getInstrumentation directly provides access to the
Instrumentation API. It looks like the EnableMonitoring command is close to what is required here,
but we may need to directly use the equivalent of attachAgent.