Techniques are described herein for reducing overhead, risk, and code maintenance for Java® instrumentation required to monitor customer-facing applications. These techniques avoid transforms and retransforms, thereby eliminating risk and overhead as there are no transformers registered with the Java Virtual Machine (JVM). This may use the same call mechanism as a typical transform, and therefore requires no code changes in instrumentation. The "dummy" transform may always obtain a real class (not a null) that has not been initialized. Thus, a user may add a static block or other one-time-only objects. These techniques are also portable, because the only hook is in the core JVM classloader, and compact, because very little code is required for the agent itself.
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.
Hulick, Ted, "JAVA INSTRUMENTATION OPTIMIZATION TECHNIQUES", Technical Disclosure Commons, (October 24, 2019)