Garbage Collector-Agnostic Barriers for Ahead-of-Time Compilation

The Java programming language utilizes automatic memory management in the form of garbage collection. The Java Virtual Machine includes many different garbage collector implementations to accommodate different platform and performance requirements. Garbage collectors use a mechanism known as a barrier to synchronize memory accesses of allocated objects. The Java Virtual Machine also performs optimizations during the execution of programs by compiling hot code paths into machine instructions through just-in-time compilation. However, this process creates a noticeable warm-up overhead. To remedy this, much work has been done to compile programs ahead-of-time instead. However, it is unclear what code should be generated for the garbage collector barriers at compile time as the garbage collector is not selected until runtime. This thesis designs and implements a garbage collector-agnostic write barrier that can be compiled ahead-of-time for the G1, ZGC, Serial, and Parallel garbage collectors for the Java Virtual Machine. Statistical evaluation of the proposed implementation exhibits minor performance regressions in multiple metrics, such as throughput and p90 latency, across a variety of benchmarks. Analysis also revealed a moderate increase in generated code size. The results of this work indicate that GC-agnostic write barriers can be implemented in the HotSpot JVM with minimal performance impact in most scenarios, enabling the Java Virtual Machine to move towards ahead-of-time compilation in the future.

Institutions

Publication Details

Journal
KTH Publication Database DiVA (KTH Royal Institute of Technology)
Published
2025-01-01
Primary Topic
Geochemistry and Geologic Mapping
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Garbage Collector-Agnostic Barriers for Ahead-of-Time Compilation

KTH Publication Database DiVA (KTH Royal Institute of Technology)
Geochemistry and Geologic Mapping
article

Garbage Collector-Agnostic Barriers for Ahead-of-Time Compilation

article en

Abstract

The Java programming language utilizes automatic memory management in the form of garbage collection. The Java Virtual Machine includes many different garbage collector implementations to accommodate different platform and performance requirements. Garbage collectors use a mechanism known as a barrier to synchronize memory accesses of allocated objects. The Java Virtual Machine also performs optimizations during the execution of programs by compiling hot code paths into machine instructions through just-in-time compilation. However, this process creates a noticeable warm-up overhead. To remedy this, much work has been done to compile programs ahead-of-time instead. However, it is unclear what code should be generated for the garbage collector barriers at compile time as the garbage collector is not selected until runtime. This thesis designs and implements a garbage collector-agnostic write barrier that can be compiled ahead-of-time for the G1, ZGC, Serial, and Parallel garbage collectors for the Java Virtual Machine. Statistical evaluation of the proposed implementation exhibits minor performance regressions in multiple metrics, such as throughput and p90 latency, across a variety of benchmarks. Analysis also revealed a moderate increase in generated code size. The results of this work indicate that GC-agnostic write barriers can be implemented in the HotSpot JVM with minimal performance impact in most scenarios, enabling the Java Virtual Machine to move towards ahead-of-time compilation in the future.

KTH Publication Database DiVA (KTH Royal Institute of Technology)
Uppsala University (SE)
Openalex Percentile: Top 64%
Geochemistry and Geologic Mapping
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Garbage Collector-Agnostic Barriers for Ahead-of-Time Compilation · KTH Publication Database DiVA (KTH Royal Institute of Technology) (2025) | TGRS Research Map | TGRS