Efficient Tracing and Versatile Analysis of Lock Contention in Java Applications on the Virtual Machine Level

Research output: Chapter in Book/Report/Conference proceedingConference proceedingspeer-review

Abstract

Concurrent programming has become a necessity in order to benefit from recent advances in processor design. However, implementing correct and scalable locking for accessing shared resources remains a challenge. Examining lock contention in an application at runtime is vital to determine where more sophisticated but error-prone locking pays off. In this paper, we present a novel approach for analyzing lock contention in Java applications by tracing locking events in the Java Virtual Machine. Unlike common methods, our approach observes not only when a thread is blocked on a lock, but also which other thread blocked it by holding that lock, and records both their call chains. This reveals the causes of lock contention instead of showing only its symptoms. We describe the techniques which we use to efficiently record trace events, metadata, and call chains. We present a versatile tool for the analysis of the traces which enables users to identify locking bottlenecks and their characteristics in an effective way. We implemented our approach in the widely used HotSpot Virtual Machine, and with a mean runtime overhead of 7.8%, we consider it efficient enough to monitor production systems
Original languageEnglish
Title of host publicationICPE '16
Editors Proceedings of the 7th Int'l Conference on Performance Engineering
PublisherACM
Pages263-274
Number of pages12
ISBN (Electronic)9781450340809
ISBN (Print)978-1-4503-4080-9
DOIs
Publication statusPublished - Mar 2016

Publication series

NameICPE’16

Fields of science

  • 102 Computer Sciences
  • 102009 Computer simulation
  • 102011 Formal languages
  • 102013 Human-computer interaction
  • 102022 Software development
  • 102029 Practical computer science

JKU Focus areas

  • Computation in Informatics and Mathematics
  • Engineering and Natural Sciences (in general)

Cite this