Repository navigation
Build profile diff: do not report the debug-info offset as a size change - #116639
Conversation
The headline size row of `Build profile diff` compares the pull request's `clickhouse-stripped` against the official master `Build (arm_release)`, and showed a roughly -3 MB delta on essentially every pull request. That delta is not the pull request. A pull request build passes `-DDISABLE_ALL_DEBUG_SYMBOLS=1` and the official master build does not, and `strip --strip-debug` does not undo the difference, because debug info reaches the code itself through XRay: whether a loop-free function is instrumented is decided by counting MachineInstrs with the debug pseudo-instructions included (`MICount += MBB.size()` in `llvm/lib/CodeGen/XRayInstrumentation.cpp`), so with `-g` thousands of functions just under the 200-instruction threshold get entry/exit sleds that the pull request build never emits. Measured on master 9d8eed3 against #116614: 11028 extra instrumented functions in the official build, 3,206,880 bytes of a 746,549,896-byte stripped binary (0.43%) - `xray_instr_map` +925,024, `xray_fn_idx` +176,448, `.text` +989,952 of sled NOPs, and `.symtab` +1,059,096 / `.strtab` +39,895 for the `.Lxray_*` and `$d` symbols the new per-function sections add. Nothing a pull request can influence, and always in the same direction. A smaller-binary delta inside twice that band is therefore no longer shown, only named with the reason. A delta in the other direction cannot be the offset, and significance is decided before the band, so a flagged row is never hidden. Rows that are still shown carry the offset as a note, so a rendered negative delta is read with it in mind. The compiler side is fixed upstream in llvm/llvm-project#219100; once that reaches the toolchain the band can go away and the row becomes exact again.
|
Workflow [PR], commit [b316b30] Summary: ✅ AI ReviewSummaryThis PR updates Final VerdictStatus: ✅ Approve |
The suppression band reached from the measured offset all the way to zero, so a pull request that grew `clickhouse-stripped` by less than the offset still compared smaller than the official master build and had its row dropped entirely - a real regression turned into a silent omission. Hide a window *centred* on the measured offset instead (`XRAY_DEBUG_OFFSET_RATIO` is now the measurement itself, `0.43%`, and `XRAY_DEBUG_OFFSET_TOLERANCE` its half-width), so a delta that differs from the offset by more than half of it is shown in either direction. The reported scenario - `+2 MiB` of real growth landing at `-1.06 MiB` against master - is now rendered, and `test_growth_smaller_than_the_offset_is_still_reported` pins it.
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units6 translation units recompiled, 4 s compile time in total, 6 of them have a recent master baseline. |
|
📊 Cloud Performance Report ✅ AI verdict: This is a CI/tooling PR: it only edits the build-profile-diff reporting script, adds a test for it, and bumps the cctz timezone submodule. ClickBench Q30 and Q31 are GROUP BY aggregation queries that touch none of that (no date/timezone work), and both deltas (+23.7% and +20.3%) fall inside master's current variance band with CPU time essentially unchanged. The deterministic gates already held both at not_sure as within-baseline-envelope, which is correct — these are run-to-run variance, not a PR effect. clickbenchFlagged queries (2 of 43)
Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on. tpch_adapted_1_official🟢 No significant changes Debug info
|
The previous commit was made with a stale submodule checkout, which pushed `contrib/cctz` back from the tzdata 2026c bump (`8e694da`) to `c2ba12b`. The pull request only touches `ci/`, so the gitlink is restored to the value on `master`.
…it added Three `ci/tests` files this pull request deletes were modified on master (`test_gh.py`, `test_hung_check_exit_code.py`, `test_revert_ci_regressions.py`); the removal wins, which is the point of the change. Master also added `ci/tests/test_build_profile_diff_xray_offset.py` (from #116639) after this branch was cut. It is deleted here as well - otherwise the merge would leave `ci/tests` alive with a single file and the change would not do what it says. `ci/tests` is now empty. `.github/workflows/pull_request.yml` was regenerated with `python3 -m ci.praktika yaml` from the merged config rather than hand-merged, so the `ci_tests` job is gone from the workflow and its entry from the `finish_workflow` `needs:` list. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Related: llvm/llvm-project#219100
The headline size row of
Build profile diff (arm_release)showed a roughly-3 MBdelta on essentially every pull request, no-op ones included. That delta is not the pull request.The row compares the pull request's
programs/clickhouse-strippedagainst the official masterBuild (arm_release), and the two differ in exactly two cmake flags: master gets-DCLICKHOUSE_OFFICIAL_BUILD=1, the pull request gets-DDISABLE_ALL_DEBUG_SYMBOLS=1.strip --strip-debugdoes not undo the second one, because debug info reaches the code itself through XRay: whether a loop-free function is instrumented is decided by counting MachineInstrs with the debug pseudo-instructions included (MICount += MBB.size()inllvm/lib/CodeGen/XRayInstrumentation.cpp), so with-gthousands of functions just under the 200-instruction threshold get entry/exit sleds that the pull request build never emits.Measured on master
9d8eed34c114against #116614, both binaries re-stripped locally from the CI artifacts and matching the build logs byte for byte (746,549,896vs743,343,016):.symtab.textxray_instr_mapxray_fn_idx.strtab.eh_frame/.gcc_except_table/.eh_frame_hdr.clickhouse.hashAll of it reconciles to 11,028 extra instrumented functions in the official build:
xray_fn_idxgrows by exactly that many 16-byte entries,.symtabby 2 × 11,028.Lxray_sleds_start*/.Lxray_fn_idx*labels plus 22,063 AArch64$dmapping symbols, and.textby 28,907 sleds of 32 bytes plus-falign-functions=64padding.CLICKHOUSE_OFFICIAL_BUILDcontributes 32 bytes.So the number was a property of the flag pair, always in the same direction, and it invited a hunt for a size win that does not exist. A delta that lands on that offset is therefore no longer shown, only named with the reason, and rows that are still shown carry the offset as a note.
The suppressed interval is a window centred on the measurement, not everything up to it:
XRAY_DEBUG_OFFSET_RATIOis the measured0.43%andXRAY_DEBUG_OFFSET_TOLERANCEits relative half-width, so only a delta in[-4.59 MiB, -1.53 MiB]is hidden. Reaching up to zero instead would have swallowed a real pull request that grows the binary by less than the offset - it still compares smaller than master - which is a false green rather than removed noise. Significance is also decided before the window, so a flagged row is never hidden.This does hide a genuine
3 MiBsaving too, and there is no way around that while the baseline is the official build - the two are indistinguishable here. Recovering the exact number needs either a baseline compiled with the pull request's flags (the warmup build, once it links a binary of its own) or the offset gone from the compiler, which is what the linked LLVM pull request does.ci/tests/test_build_profile_diff_xray_offset.pypins the suppression against the two real measured sizes, and pins that it does not swallow a growing binary, a pull request that grows the binary by less than the offset, a shrink beyond the window, a significant shrink, or a lost PR-side size row.Changelog category (leave one):
Workflow [PR]
Sync PR [sync-upstream/pr/116639]
Version info
26.9.1.340(included in26.9and later)