Reputation: 285
Java instrumentation which involves modification of byte code at run time is used to monitor the performance of the code. Even profiling is used in Java to monitor the performance of the code. I wanted to know what is the strong difference between profiler and Java instrumentation that makes Java instrumentation more effective. Thanks in advance :)
Upvotes: 1
Views: 721
Reputation: 1172
JVM instrumentation feature was introduced in JDK 1.5 and is based on byte code instrumentation. Actually, when a class is loaded, you can alter the corresponding byte code to introduce features such as methods execution profiling or event tracing. Most of Java Application Performance Management (APM) solutions use this mechanism to monitor JVM.
Often profilers use Instrumentation to get additional information. Profiling is achieved by instrumenting either the program source code or its binary executable form using a tool called a profiler (or code profiler). Profilers may use a number of different techniques, such as event-based, statistical, instrumented, and simulation methods.
Upvotes: 2