Jolt: Lightweight dynamic analysis and removal of object churn
Abstract
It has been observed that component-based applications exhibit object churn, the excessive creation of short-lived objects, often caused by trading performance for modularity. Because churned objects are short-lived, they appear to be good candidates for stack allocation. Unfortunately, most churned objects escape their allocating function, making escape analysis ineffective. We reduce object churn with three contributions. First, we formalize two measures of churn, capture and control (15). Second, we develop lightweight dynamic analyses for measuring both capture and control. Third, we develop an algorithm that uses capture and control to inline portions of the call graph to make churned objects non-escaping, enabling churn optimization via escape analysis. Jolt is a lightweight dynamic churn optimizer that uses our algorithms. We embedded Jolt in the JIT compiler of the IBM J9 commercial JVM, and evaluated Jolt on large application frameworks, including Eclipse and JBoss. We found that Jolt eliminates over 4 times as many allocations as a state-of-the-art escape analysis alone. Copyright © 2008 ACM.