[all-commits] [llvm/llvm-project] d12bae: [BOLT] Make .debug_names emission reproducible
Rafael Auler via All-commits
all-commits at lists.llvm.org
Mon Sep 21 15:32:27 PDT 2026
Branch: refs/heads/users/rafaelauler/bolt-fix-nondeterminism-debugstr
Home: https://github.com/llvm/llvm-project
Commit: d12baec56a90148db5f7538cdda9d2bbe6439c57
https://github.com/llvm/llvm-project/commit/d12baec56a90148db5f7538cdda9d2bbe6439c57
Author: Rafael Auler <rafaelauler at fb.com>
Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths:
M bolt/include/bolt/Core/DebugNames.h
M bolt/lib/Core/DebugNames.cpp
Log Message:
-----------
[BOLT] Make .debug_names emission reproducible
Summary:
--update-debug-sections does not produce the same binary twice when the
input has a .debug_names section, or is given one with
--create-debug-names-section. Three sections vary from run to run:
.debug_str, .debug_names and .debug_str_offsets. On a two-CU
split-DWARF test binary, ten runs of the same llvm-bolt produced three
different outputs.
PR #197859 made the per-bucket work merge in partition order precisely so
the output would be reproducible, but missed this section. Two issues:
- .debug_str offsets were handed out from the workers, so main.dwo.dwo
added by the merge step lands in a different place in each
run. The string offsets stored in .debug_names follow from it, and
so does .debug_str_offsets;
- hash colliding names were ordered by insertion (worker) order, also
non-deterministic.
We now determine string positions in the non-concurrent finalize step(),
and order collisions.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list