Book Image

WildFly Performance Tuning

Book Image

WildFly Performance Tuning

Overview of this book

Table of Contents (17 chapters)
WildFly Performance Tuning
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

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, sampling relies on analyzing the stack traces and thread dumps that are taken at regular time intervals. These intervals can be defined, for example to 10 per second.

So, what approach should you use? As always, the answer is that it depends on...