Table of Contents
Fetching ...

OOPredictor: Predicting Object-Oriented Accesses using Static Analysis

Hassan Arafat, David Bremner, Kenneth B. Kent, Julian Wang

TL;DR

The paper tackles memory latency caused by pointer chasing in object-oriented programs by proposing a static-analysis–based predictor that generates Markov-chain models of object-field accesses. Implemented within the OpenJ9 JVM's OMR optimization framework, the approach aims to predict runtime access patterns without profiling, enabling low-overhead optimizations and informing garbage-collection decisions. Evaluation across Renaissance and SPECjbb benchmarks shows generally high OO match and termination rates, with notable variability by workload and method size; a preliminary affinity-graph analysis suggests compile-time predictions can approximate profiling-derived graphs. The work demonstrates the feasibility of static analysis to capture OO access behavior and offers a pathway to compile-time optimizations that reduce cache misses and memory stalls, while highlighting directions for extending to inter-procedural analysis and broader benchmarks.

Abstract

Object-oriented Programming has become one of the most dominant design paradigms as the separation of concerns and adaptability of design reduce development and maintenance costs. However, the convenience is not without cost. The added indirection inherent in such designs causes excessive pointer chasing, negatively affecting locality, which in turn degrades the performance of cache structures. Furthermore, modern hardware prefetchers are mostly stride prefetchers that are ill-equipped to handle the unpredictability of access patterns generated by pointer chasing. Most software approaches that seek to address this problem resort to profiling the program as it runs, which comes with a significant run-time overhead or requires data from previous runs. In this paper, we propose the use of compile-time static analysis to predict the most common access patterns displayed by a program during run time. Since Java is one of the most popular object-oriented languages, we implement our prototype within the OpenJ9 JVM, inside the OMR optimizer infrastructure. The outputs of our proposed predictor are Markov chains that model the expected behavior of the program. The effectiveness of the proposed predictor is evaluated by comparing the model with the actual run-time behavior of the program measured using an instrumented interpreter. Our experiments show that the proposed predictor exhibits good accuracy and can be used to inform minimally intrusive load stall mitigation strategies, e.g. informing copying GCs on more locality-friendly copying orders

OOPredictor: Predicting Object-Oriented Accesses using Static Analysis

TL;DR

The paper tackles memory latency caused by pointer chasing in object-oriented programs by proposing a static-analysis–based predictor that generates Markov-chain models of object-field accesses. Implemented within the OpenJ9 JVM's OMR optimization framework, the approach aims to predict runtime access patterns without profiling, enabling low-overhead optimizations and informing garbage-collection decisions. Evaluation across Renaissance and SPECjbb benchmarks shows generally high OO match and termination rates, with notable variability by workload and method size; a preliminary affinity-graph analysis suggests compile-time predictions can approximate profiling-derived graphs. The work demonstrates the feasibility of static analysis to capture OO access behavior and offers a pathway to compile-time optimizations that reduce cache misses and memory stalls, while highlighting directions for extending to inter-procedural analysis and broader benchmarks.

Abstract

Object-oriented Programming has become one of the most dominant design paradigms as the separation of concerns and adaptability of design reduce development and maintenance costs. However, the convenience is not without cost. The added indirection inherent in such designs causes excessive pointer chasing, negatively affecting locality, which in turn degrades the performance of cache structures. Furthermore, modern hardware prefetchers are mostly stride prefetchers that are ill-equipped to handle the unpredictability of access patterns generated by pointer chasing. Most software approaches that seek to address this problem resort to profiling the program as it runs, which comes with a significant run-time overhead or requires data from previous runs. In this paper, we propose the use of compile-time static analysis to predict the most common access patterns displayed by a program during run time. Since Java is one of the most popular object-oriented languages, we implement our prototype within the OpenJ9 JVM, inside the OMR optimizer infrastructure. The outputs of our proposed predictor are Markov chains that model the expected behavior of the program. The effectiveness of the proposed predictor is evaluated by comparing the model with the actual run-time behavior of the program measured using an instrumented interpreter. Our experiments show that the proposed predictor exhibits good accuracy and can be used to inform minimally intrusive load stall mitigation strategies, e.g. informing copying GCs on more locality-friendly copying orders

Paper Structure

This paper contains 26 sections, 4 figures, 1 table, 2 algorithms.

Figures (4)

  • Figure 1: Violin plots for data collected from the SPECjbb workloads
  • Figure 2: Violin plots of data collected from the apache-spark group in the Renaissance suite
  • Figure 3: Violin plots of data collected from the functional group in the Renaissance suite
  • Figure 4: Similarity metrics between affinity graphs from the chi-square benchmark