Split images: write the heap image to the .ji #61649
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 421 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.362
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #61649"
general
weight: 0.35
xal-0
We've long emitted "split images", meaning a system image using both
--output-oand--output-jiwhen precompiling packages. We do this because we need to be able to look at the.jiheader to determine compatibility withoutdlopen()ing the corresponding.so. The situation looks something like this:"allocated" means it is actually loaded into the process address space, while "shared" sections can be shared between many processes, saving some memory.
jl_system_image_datais not directly used by the native code, because we have to fix up all references to it when loading the image. It's nice to have the ability to create a system image in a single file, but there are many downsides to putting the heap image in the dynamic library:ConstantDataArrayfor the serialized heap image. We try our best to free the useless copy as we go, but we can't avoid creating the 3 copies during this process.This commit attempts to make the situation better, by moving the heap image from the dynamic library to the
.jiwhen using--output-oin conjunction with--output-ji. This has few downsides, since we are already splitting the image across two files:In addition, this change adds support for compiling split system images (in addition to the already-supported split pkgimages). To use a split system image, you provide the
.soto the-Jargument to Julia, and the.solooks for a sibling.jifile to load the heap image from.Other than helping support very large heap images on Windows, we also drop the peak memory consumption when compiling such an image by avoiding the third copy for LLVM (see attached plot).
<img width="1300" height="700" alt="phys_bars" src="https://github.com/user-attachments/assets/52e520c3-aa08-455f-a517-22829fe311da" />