Skräpsamlingsoberoende inläsningsbarriärer : Mot flexibel ahead-of-time-kompilering av Java

Java, executed on the HotSpot Java Virtual Machine, benefits from just-in-time compilation, in which profiling guides optimizations. There is also ongoing research on ahead-of-time compilation for Java, which has the benefit of reduced startup time compared to just-in-time compilation. One challenge is that ahead-of-time compilation forces a choice in one of several garbage collectors, to the detriment of runtime flexibility. This is due to opaquely inserted instructions called barriers, which facilitate communication between the garbage collector and application. These barriers are primarily emitted during field accesses and updates, and their concrete instructions depend on the garbage collector. This thesis investigates garbage-collector-agnostic load barriers, instructions for field accesses that the Serial, Parallel and Z garbage collectors can leverage. Presently, only G1 and Z have load barriers. The research objectives are to 1) develop; and 2) measure the impact of agnostic load barriers in terms of execution time and latency of real-world applications. An agnostic load barrier algorithm, called the Patching Barrier, is developed. The Patching Barrier emits mostly-correct machine code, which is then just-in-time modified by the garbage collector during runtime for correctness. The implementation takes advantage of existing mechanisms in HotSpot. Serial, Parallel and G1 see the introduction of more machine code. Benchmarking the Patching Barrier on the DaCapo Chopin suite indicates regressions in execution time and latency. Execution time increases up to 17% for Serial, 19% for Parallel, 17% for G1 and 23% for Z, although outlier programs which perform better exist. Latency also increases up to 15% for Serial, 17% for Parallel, 20% for G1 and 39% for Z. Smaller heaps generally perform better in execution time tests, but no such trend was found for latency. These results indicate that agnostic load barriers are feasible, at the cost of higher execution time and latency regressions. However, there is still room for further performance optimizations. This thesis provides real-world insights that will guide researchers and developers in their trade-off decisions in the future.

Publication Details

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

Skräpsamlingsoberoende inläsningsbarriärer : Mot flexibel ahead-of-time-kompilering av Java

KTH Publication Database DiVA (KTH Royal Institute of Technology)
Logic, programming, and type systems
article

Skräpsamlingsoberoende inläsningsbarriärer : Mot flexibel ahead-of-time-kompilering av Java

article en

Abstract

Java, executed on the HotSpot Java Virtual Machine, benefits from just-in-time compilation, in which profiling guides optimizations. There is also ongoing research on ahead-of-time compilation for Java, which has the benefit of reduced startup time compared to just-in-time compilation. One challenge is that ahead-of-time compilation forces a choice in one of several garbage collectors, to the detriment of runtime flexibility. This is due to opaquely inserted instructions called barriers, which facilitate communication between the garbage collector and application. These barriers are primarily emitted during field accesses and updates, and their concrete instructions depend on the garbage collector. This thesis investigates garbage-collector-agnostic load barriers, instructions for field accesses that the Serial, Parallel and Z garbage collectors can leverage. Presently, only G1 and Z have load barriers. The research objectives are to 1) develop; and 2) measure the impact of agnostic load barriers in terms of execution time and latency of real-world applications. An agnostic load barrier algorithm, called the Patching Barrier, is developed. The Patching Barrier emits mostly-correct machine code, which is then just-in-time modified by the garbage collector during runtime for correctness. The implementation takes advantage of existing mechanisms in HotSpot. Serial, Parallel and G1 see the introduction of more machine code. Benchmarking the Patching Barrier on the DaCapo Chopin suite indicates regressions in execution time and latency. Execution time increases up to 17% for Serial, 19% for Parallel, 17% for G1 and 23% for Z, although outlier programs which perform better exist. Latency also increases up to 15% for Serial, 17% for Parallel, 20% for G1 and 39% for Z. Smaller heaps generally perform better in execution time tests, but no such trend was found for latency. These results indicate that agnostic load barriers are feasible, at the cost of higher execution time and latency regressions. However, there is still room for further performance optimizations. This thesis provides real-world insights that will guide researchers and developers in their trade-off decisions in the future.

KTH Publication Database DiVA (KTH Royal Institute of Technology)
Openalex Percentile: Top 72%
Logic, programming, and type systems
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.

Skräpsamlingsoberoende inläsningsbarriärer : Mot flexibel ahead-of-time-kompilering av Java · KTH Publication Database DiVA (KTH Royal Institute of Technology) (2025) | TGRS Research Map | TGRS