Identifying Inefficiencies in Java Programs via Instrumentation-based Object Lifecycle Tracing
Shaokang Du , Kelun Lei , Xin You , Hailong Yang , Jia Yuan , Zhongzhi Luan , Yi Liu , Depei Qian
Java plays an indispensable role in developing enterprise-level and large-scale applications. For Java programs, managing the object lifecycle efficiently is paramount for achieving optimal performance. To improve Java object management, prior research works have focused on identifying objects that are allocated in large quantities over a short period or that are duplicated. However, few studies have identified object inefficiencies due to inappropriate object lifecycle management, and thus miss the opportunities for further optimizing the performance of Java programs. In this paper, we systematically investigate object inefficiencies in Java programs and categorize five inefficiency patterns. Based on the observed inefficiency patterns, we propose JLITE, a sampling-based object lifecycle tracing tool that leverages runtime bytecode instrumentation to pinpoint these inefficiencies. JLITE achieves broad compatibility by implementing flexible class transformation to collect object lifecycle events without any JVM modifications. Furthermore, JLITE combines two instrumentation strategies for detecting object allocation and usage inefficiencies with low overhead. Compared to state-of-the-art profilers with their supported dataset, JLITE incurs 10.35× runtime overhead in average, which is much lower than other instrumentation-based approaches and closer to that of PMU-based profilers. Our evaluation with wider range of representative benchmarks and real-world applications demonstrates JLITE’s effectiveness in identifying object inefficiencies with only 3.40× runtime overhead and 1.19× memory overhead on average. Based on the optimization guidance of JLITE, we can eliminate object inefficiencies of Java programs, yielding an average performance speedup of 1.88× and up to 4.14× in the best case.
Java / Profiling / Performance Optimization
Higher Education Press 2026
/
| 〈 |
|
〉 |