# Pinpointing Performance Inefficiencies in Java

**Authors:** Pengfei Su, Qingsen Wang, Milind Chabbi, Xu Liu

arXiv: 1906.12066 · 2019-07-01

## TL;DR

JXPerf is a lightweight Java performance analysis tool that identifies wasteful memory operations with minimal overhead, enabling practical optimizations in production environments.

## Contribution

The paper introduces JXPerf, a novel hardware-assisted tool for pinpointing wasteful memory operations in Java, overcoming traditional overhead and accuracy issues.

## Key findings

- JXPerf achieves only 7% runtime overhead.
- Using JXPerf-guided optimizations yields significant speedups.
- The tool effectively attributes inefficiencies to specific code locations.

## Abstract

Many performance inefficiencies such as inappropriate choice of algorithms or data structures, developers' inattention to performance, and missed compiler optimizations show up as wasteful memory operations. Wasteful memory operations are those that produce/consume data to/from memory that may have been avoided. We present, JXPerf, a lightweight performance analysis tool for pinpointing wasteful memory operations in Java programs. Traditional byte-code instrumentation for such analysis (1) introduces prohibitive overheads and (2) misses inefficiencies in machine code generation. JXPerf overcomes both of these problems. JXPerf uses hardware performance monitoring units to sample memory locations accessed by a program and uses hardware debug registers to monitor subsequent accesses to the same memory. The result is a lightweight measurement at machine-code level with attribution of inefficiencies to their provenance: machine and source code within full calling contexts. JXPerf introduces only 7% runtime overhead and 7% memory overhead making it useful in production. Guided by JXPerf, we optimize several Java applications by improving code generation and choosing superior data structures and algorithms, which yield significant speedups.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1906.12066/full.md

## Figures

15 figures with captions in the complete paper: https://tomesphere.com/paper/1906.12066/full.md

---
Source: https://tomesphere.com/paper/1906.12066