Peter Hofer,
"Method Profiling and Lock Contention Profiling on the Java Virtual Machine Level"
, Eigenverlag, 10-2016
Original Titel:
Method Profiling and Lock Contention Profiling on the Java Virtual Machine Level
Sprache des Titels:
Englisch
Original Kurzfassung:
Large-scale software systems are frequently distributed over a network of computers in different locations, commonly rely on virtualization, and are often used by thousands of users at the same time. Application Performance Management (APM) software is used to continuously monitor such software systems. It uses profiling approaches to collect real-world performance data that can be used to identify and understand performance problems. However, unlike profiling tools, APM software must incur only minimal runtime overhead while still collecting sufficiently detailed performance data.
In order to address these challenges for Java, we propose a Java virtual machine implementation with sophisticated built-in profiling mechanisms. By integrating with the virtual machine, these mechanisms can efficiently collect accurate performance data. First, we propose new approaches for sampling-based method profiling, which attribute execution time to method calls. Inside the virtual machine, our approaches can directly decode and manipulate call stacks and can control how threads are paused to capture their states. Second, we propose a novel approach for lock contention profiling, which reveals concurrency issues that cause threads to wait for each other. Our approach integrates with the low-level implementation of locking in the virtual machine to efficiently collect accurate data while avoiding side effects. Finally, we propose a new approach to quantify effects of virtualization, which can misrepresent the resource usage of threads.
We implemented our approaches in the HotSpot Virtual Machine, a production-quality, high-performance Java virtual machine implementation. We evaluate our approaches using benchmarks with non-trivial, real-world workloads and demonstrate their efficiency and the accuracy of the data which they collect.