Skip to content

radlink: performance, memory, IFC/GDK fixes (refreshed on dev@47de6bf3) - #842

Draft
honkstar1 wants to merge 132 commits into
EpicGames:devfrom
honkstar1:radlink-pr-series
Draft

honkstar1 wants to merge 132 commits into
EpicGames:devfrom
honkstar1:radlink-pr-series

Conversation

@honkstar1

@honkstar1 honkstar1 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

September 8 refresh

This block supersedes older base-revision and validation notes below.

  • Head: ad4d21695e504237004061b2b3ba0d35560dd0c0.
  • Updated dependency/base: upstream dev 47de6bf3. The PR still targets upstream dev.
  • Incremental review: 47de6bf3...ad4d2169.
  • Local validation: Clang/LLD 20.1.8, Release -O2; 178 passed, 0 failed/crashed, 1 excluded in linker/* torture/* base/* eval2/*. Exclusion: ms_link_icf_section_flag_eligibility (the previously noted Microsoft-linker comparison). These counts were revalidated after the portability correction; no farm/runtime-soak result is claimed.
  • Linux follow-up: CI exposed missing internal linkage on lnk_obj_dist_weight_is_before after the C99 portability refresh. This is corrected in radlink: performance, memory, IFC/GDK fixes (refreshed on dev@47de6bf3) #842 and inherited by all dependent layers. Local Linux debug builds with Clang 18 and GCC 13 succeeded, and the GitHub matrix has been rerun for these heads.
  • Updated with merge commits and fast-forward pushes only; no force rewrite. Existing draft status is unchanged.

Conflict resolution retains the regression-proven archive-symbol/function-override rescans. Upstream ICF offsets, the pending-input guard, single-task fast path and portability/build changes are integrated. Migrated tests preserve the upstream ICF, DEFAULTLIB and MSF coverage.

Older text is retained below for historical context. Already-integrated upstream changes are behind the refreshed merge base rather than new standalone fixes in this refresh.


Radlink performance, memory, and correctness series

Refreshed onto dev at b4c52780 on 2026-09-02. Head: 6fa35bcc.
This PR contains 105 ordered commits, 52 changed files, +8,258 / -1,383 lines.
Compressed OBJ support is separate in #892; it is not included here. The shared-pool work formerly proposed in #847 is consolidated here.

Reconciliation with upstream

Of the previously published 95 commits, 94 are retained: 92 are patch-equivalent, the subsection-accessor change is adapted to the new test harness, and the library-rescan regression is ported from C to a declarative .tst. git range-diff represents that test migration as delete/add, not as a retained patch.

The remaining commit, the C11/BLAKE3 CPU-feature-load build workaround, is removed because upstream b4c52780 supersedes it. The four implementations already removed in the August cleanup stay removed: the old unresolved-symbol line mapper, writable raw-symbol copies, leaf-reference node arenas, and final-layout side arrays. Upstream's new declarative tests and BLAKE3 assembly implementation are preserved. Clang builds now use llvm-ml for the assembly rather than invoking ml64.

Review areas

  • Correctness and diagnostics: header-unit IFC debug-record resolution, GDK import variants, library-search symbol-state rescans, invalid-library indexing, entry-inference state, and missing DLL-import dependency diagnostics.
  • Debug fidelity: folded-function records/source identity and function-scoped statics; /OPT:GCTYPES remains opt-in and disabled by default.
  • Input and memory lifetime: read-only input mappings, private patch metadata, reusable debug-section windows/journals, bounded fault-heavy work, earlier input/buffer release, and arena reaping.
  • Type merge and PDB scaling: unique-count sizing, compact type-index descriptors, giant-stream checkpoints, array-backed GSI/PSI buckets, streamed payloads, direct module copies, and overlapped decommit.
  • REF/ICF throughput: cached relocation resolution, parallel dead-section removal, and compact refinement/associative-graph storage.
  • Shared workers: opt-in cross-process fair-share governor; non-shared operation retains the barrier path. Stranded-grant/semaphore failure paths do not perform potentially blocking logging.

Newly included, individually reviewable fixes

  • f555a9dd: emit BigObj for oversized generated import objects, with writer and 22,000-import regressions. This entire commit applies cleanly directly to upstream b4c52780, including both tests; it is independent of the rest of this series and of compressed OBJ support.
  • 2aa63c01: index function-override aliases instead of repeatedly scanning ordinary aliases; declarative regression included.
  • c71da326: park the governor once demand is covered; repeated queued/tiny/barrier-cohort regression.
  • 1076b06c: correct PDB summary timer brackets and check the reported module interval against the enclosing invocation.
  • a721072c: correct the test sort-callback signature for Clang.
  • 34587780, 9f9a097d, c7f33b3e, 4353099d: consolidate the existing general diagnostic/shared-pool hardening from the compressed-object stack into this PR.

Fresh validation of this revision

  • Windows x64, Clang/LLVM 20.1.8: release and debug/assert-enabled builds succeed.
  • Release suite: 158 passed, 0 failed, 0 crashed, 12 skipped.
  • Debug suite: 158 passed, 0 failed, 0 crashed, 12 skipped.
  • The 12 exclusions are the MSVC-invoking cases: generic_build_previous_exit_condition, ms_link_icf_section_flag_eligibility, determ_test, icf_cpp_identical_functions_fold, icf_cpp_multihop_functions_do_not_fold, icf_llvm_addrsig_external_symbol, icf_llvm_addrsig, import_export, infer_asan, ms_link_icfs_identical_comdats, generic_build_default_output, and generic_build_output_with_spaces. No local MSVC compiler/linker was used for this refresh; GitHub runs its existing compiler matrix automatically.
  • Raw-input links from this head participate in a 24-run, same-path EXE/PDB byte-parity matrix against the previous integration binary and the ordinary/Oodle radlink: portable compressed OBJ support (restacked on #842) #892 builds. Every linked fixture executes successfully. These are small correctness fixtures, not a production benchmark.

Outstanding validation and scope limits

Large-input ICF nondeterminism remains unresolved. A September 2 frozen raw-OBJ reproduction produces differing image layout/PDB bytes with ICF enabled; a rebuilt pre-merge b93924f9 control also reproduces it, while its ICF-disabled pair is byte-identical. It is not yet established whether the root cause is upstream ICF or retained PR work. Successful small tests do not close this issue.

The exact refreshed heads have not been rerun against full Common/Engine inputs, launched in the editor, or validated across a Linux/Wine/UBA farm. Earlier large-link measurements belong to older revisions and are not fresh performance or determinism claims for this head. Production process-exit measurements must include the post-Process/End kernel teardown tail; printed phase totals are not that measurement.

The recent relocation-decode-window experiment, independent /RAD_UNMAP_WORKERS tuning, and sharded compressed-cache backing are deliberately not included in either refreshed PR. They remain separate pending memory, performance, and production-path validation.

GitHub CI follow-up

The automatic matrix is not green. All 26 build-only jobs have passed; at the latest inspection three debug run jobs failed and two release run jobs were still running.

  • Windows Clang debug reproduces upstream's GetOpenFileNameW debugger link failure and ASan _ITERATOR_DEBUG_LEVEL mismatch in the mule fixture. Windows MSVC debug reaches the existing ms_link_icf_section_flag_eligibility failure. Those failures also occur in the upstream b4c52780 run.
  • Linux now gets past upstream's incompatible sort-callback compile error, fixed here. It stops in unchanged delay_import.tst because libcmt.lib is unavailable, followed by DLL entry-point inference failure. The upstream Linux run failed earlier at compilation, so no passing upstream Linux runtime control is claimed.
  • The local supported-subset results above remain separate from the full CI result. No failing test has been disabled or weakened in these PRs to hide the CI failures.

@honkstar1
honkstar1 force-pushed the radlink-pr-series branch from 8b67cdb to d70c7b1 Compare June 22, 2026 05:20
@honkstar1
honkstar1 force-pushed the radlink-pr-series branch from d70c7b1 to bd71560 Compare June 25, 2026 06:01
@honkstar1 honkstar1 changed the title radlink: link-time perf, peak-memory, /OPT:ICF[STATIC], /OPT:GCTYPES, C++ header-units radlink: perf + feature series — ICF/ICFSTATIC, GCTYPES, header-units, link-time + memory (rebased on dev, taken commits dropped) Jun 25, 2026
@honkstar1
honkstar1 force-pushed the radlink-pr-series branch 4 times, most recently from f5ec08b to 4e8ae06 Compare July 4, 2026 02:32
@honkstar1
honkstar1 force-pushed the radlink-pr-series branch 7 times, most recently from c11c30a to 2a711f1 Compare July 14, 2026 00:46
@honkstar1
honkstar1 force-pushed the radlink-pr-series branch 3 times, most recently from e4a2a9c to 3c25d94 Compare July 21, 2026 05:48
@honkstar1
honkstar1 force-pushed the radlink-pr-series branch 4 times, most recently from 62e1d2e to 0a96b8d Compare August 14, 2026 20:08
@honkstar1 honkstar1 changed the title radlink: perf + feature series — ICF/ICFSTATIC, GCTYPES, header-units, link-time + memory (rebased on dev, taken commits dropped) radlink: performance, memory, IFC/GDK fixes (rebased on dev@3057d0b7) Aug 14, 2026
@honkstar1 honkstar1 changed the title radlink: performance, memory, IFC/GDK fixes (rebased on dev@3057d0b7) radlink: performance, memory, IFC/GDK fixes (rebased on dev@653cc986) Aug 26, 2026
honkstar1 and others added 7 commits September 3, 2026 12:03
Actually it should llvm-ml64, but older llvm versions don't include llvm-ml64 binary.
Only disadvantage over ml64.exe is that there will be no coff debug info, but it's
asm code anyway, so meh...
* add clang-17 builds on ubuntu
* add vs2026 builds on windows
* temporarily disable "run" jobs
* better naming for matrix jobs
* use explicit debug/release build steps, not part of job matrix
NikitaSmith057 and others added 4 commits September 4, 2026 11:48
* changed test to apply full page allocation pattern in a stream
* added new test cases for the page allocation pattern
* bugfix stream growth logic
Refresh against dev@47de6bf3. Retain regression-proven archive/override rescans, integrate ICF target offsets and the single-task fast path, and preserve migrated DEFAULTLIB/MSF/ICF test coverage.
honkstar1 added a commit to honkstar1/raddebugger that referenced this pull request Sep 8, 2026
Restack on dev@47de6bf3 through EpicGames#842 and EpicGames#892 while preserving decode-window, backing-shard and cleanup-cap changes.
honkstar1 added a commit to honkstar1/raddebugger that referenced this pull request Sep 8, 2026
Refresh against dev@47de6bf3 without adding the compressed-object or memory-cleanup PR layers.
@honkstar1 honkstar1 changed the title radlink: performance, memory, IFC/GDK fixes (refreshed on dev@b4c52780) radlink: performance, memory, IFC/GDK fixes (refreshed on dev@47de6bf3) Sep 8, 2026
C99 inline semantics after the dev portability refresh otherwise leave this address-taken callback undefined in Linux builds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants