Profiling and sampling

In the Java universe, profiling technically involves instrumenting the Java bytecode in order to make accurate calculations of execution down to the method level. Instrumenting the Java bytecode is a time-consuming operation that is performed for all code in the JVM when profiling starts. The amount of instrumented bytecode can, however, be limited by defining what should be included or excluded, thereby speeding up the instrumentation time in profiling. Depending on tool support, theses definitions can be done on package, class, or method level. As the profiling terminates, the bytecode is normally restored.

Sampling is a kind of lightweight profiling. Instead of physically instrumenting the Java bytecode as done in profiling, ...

Get WildFly Performance Tuning now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.