Skip to content

build: fix C-only deadcode links and WASI LTO codegen - #2721

Open
cpunion wants to merge 8 commits into
xgo-dev:mainfrom
cpunion:codex/fix-size-build-blockers-2679-20261003
Open

cpunion wants to merge 8 commits into
xgo-dev:mainfrom
cpunion:codex/fix-size-build-blockers-2679-20261003

Conversation

@cpunion

@cpunion cpunion commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

C-only entry points preload runtime exports without building their archives. Exclude those unbuilt packages from the DCE closure and diagnose missing metadata for packages that are actually linked.

WASI Full/Thin LTO passes the compile/link options, preserves required Wasm function features, and explicitly selects the Wasm exception model. This prevents LLVM 22 from deleting SjLj catch handlers; LLVM 23 fixes the underlying initialization order in llvm/llvm-project#177542.

Add cold/cache-enabled regressions under test/sizebuild. Also clean up Chrome child processes and allow the Windows GC smoke's creator thread to finish teardown before requiring finalization.

Part of #2679. Embedded fmt.Printf still requires target runtime/ABI support.

Validation: targeted build/crosscompile tests; ESP32-C3 C-only DCE ELF builds; WAMR execution of Full/Thin println and Go/C exception cases, Full-LTO fmt.Printf and threaded GC. Linux LLVM 22-built exception and GC modules were independently run under WAMR on macOS.

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review: size-build blockers fix

Solid, carefully-reasoned change. The Go logic in applyWASILTOFeatures is correct — including the subtle normalization that lets the required + features supersede negative per-function copies (-atomics → +atomics), the IsDeclaration() skip, and the idempotency guarantee. The nil-Meta hardening in linkedPackageMetas now fails loudly instead of nil-dereferencing, and the C-only runtime-closure fix in dependencies.go is well-commented. The test matrix covers all profile/LTO combinations including the negative cases, and runtest.py's subprocess usage is safe (list args, no shell=True, validated --target choices).

A few maintainability/robustness notes below — none blocking.

Verified clean: performance (the per-function string work is gated behind a cheap early-return guard and only runs on the LTO WASI-W32 path), security (CI-only runner, inputs are developer/CI-controlled), and documentation (README's case list, cold/warm build description, and threaded-gc claims all match the fixtures).

Comment thread internal/build/build.go
Comment thread test/sizebuild/runtest.py Outdated
Comment thread test/sizebuild/runtest.py
Comment thread test/sizebuild/README.md Outdated
@codecov

codecov Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

LLGo WebAssembly build benchmarks

58c8fd3630a0 | workflow run | long-term charts

WebAssembly output sizes
Example, profile and compiler Wasm module vs base Generated JS glue vs base
cprintf/j32-emscripten/LLGo 154193 B 0 B / +0.0% 88742 B 0 B / +0.0%
cprintf/j32-goos-js/LLGo 152295 B 0 B / +0.0% 73165 B 0 B / +0.0%
cprintf/j64-emscripten-memory64/LLGo 141248 B 0 B / +0.0% 92630 B 0 B / +0.0%
cprintf/w32-goos-wasip1/LLGo 152848 B 0 B / +0.0% 0 B 0 B / 0.0%
cprintf/w32-wasi/LLGo 153560 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/j32-emscripten/LLGo 3213561 B 0 B / +0.0% 132442 B 0 B / +0.0%
fmtprintf/j32-goos-js/Go 2526852 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/j32-goos-js/LLGo 3192660 B 0 B / +0.0% 101635 B 0 B / +0.0%
fmtprintf/j64-emscripten-memory64/LLGo 2950168 B 0 B / +0.0% 139285 B 0 B / +0.0%
fmtprintf/w32-goos-wasip1/Go 2500019 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/w32-goos-wasip1/LLGo 2347479 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/w32-wasi/LLGo 2344141 B 0 B / +0.0% 0 B 0 B / 0.0%
j32-emscripten/LLGo 153428 B 0 B / +0.0% 88742 B 0 B / +0.0%
j32-goos-js/Go 1895533 B 0 B / +0.0% 0 B 0 B / 0.0%
j32-goos-js/LLGo 151768 B 0 B / +0.0% 73165 B 0 B / +0.0%
j64-emscripten-memory64/LLGo 140582 B 0 B / +0.0% 92630 B 0 B / +0.0%
reflectcall/j32-emscripten/LLGo 1543898 B 0 B / +0.0% 105908 B 0 B / +0.0%
reflectcall/j32-goos-js/Go 2191221 B 0 B / +0.0% 0 B 0 B / 0.0%
reflectcall/j32-goos-js/LLGo 1546371 B 0 B / +0.0% 90331 B 0 B / +0.0%
reflectcall/j64-emscripten-memory64/LLGo 1428570 B 0 B / +0.0% 111641 B 0 B / +0.0%
reflectcall/w32-goos-wasip1/Go 2205707 B 0 B / +0.0% 0 B 0 B / 0.0%
reflectcall/w32-goos-wasip1/LLGo 1276821 B 0 B / +0.0% 0 B 0 B / 0.0%
reflectcall/w32-wasi/LLGo 1274429 B 0 B / +0.0% 0 B 0 B / 0.0%
w32-goos-wasip1/Go 1909947 B 0 B / +0.0% 0 B 0 B / 0.0%
w32-goos-wasip1/LLGo 152495 B 0 B / +0.0% 0 B 0 B / 0.0%
w32-wasi/LLGo 153207 B 0 B / +0.0% 0 B 0 B / 0.0%
LLGo WebAssembly build measurements
Example and profile Build vs base
j32-emscripten 6.005 s +27.49 ms / +0.5% (worse)
j32-goos-js 5.971 s -177.7 ms / -2.9% (better)
j64-emscripten-memory64 5.294 s -33.57 ms / -0.6% (better)
reflectcall/w32-wasi 23.167 s -139.3 ms / -0.6% (better)
w32-goos-wasip1 4.344 s +124.3 ms / +2.9% (worse)
w32-wasi 4.055 s +51 ms / +1.3% (worse)

Compared with 5f1f13897af7 measured in the same runner job.

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

LLGo baseline benchmarks

58c8fd3630a0 | workflow run | long-term charts

Program measurements

Platform Workload File size vs base Text size vs base Build vs base Run vs base
Linux cprintf 8568 B 0 B / +0.0% 387 B 0 B / +0.0% 1.103 s -119.7 ms / -9.8% (better) 1.319 ms -107.1 us / -7.5% (better)
Linux cprintf-lto 8408 B 0 B / +0.0% 368 B 0 B / +0.0% 1.249 s -112.5 ms / -8.3% (better) 1.358 ms -75.12 us / -5.2% (better)
Linux fmtprintf 4880952 B +8 B / +0.0001639% (worse) 501619 B 0 B / +0.0% 9.449 s -215.6 ms / -2.2% (better) 3.305 ms -76.22 us / -2.3% (better)
Linux fmtprintf-lto 3600808 B 0 B / +0.0% 438538 B 0 B / +0.0% 18.964 s -128.7 ms / -0.7% (better) 3.370 ms +181.2 us / +5.7% (worse)
Linux println 674952 B 0 B / +0.0% 16855 B 0 B / +0.0% 1.286 s -81.62 ms / -6.0% (better) 1.734 ms +41.86 us / +2.5% (worse)
Linux println-lto 190024 B 0 B / +0.0% 14273 B 0 B / +0.0% 1.623 s -94.28 ms / -5.5% (better) 1.848 ms +158 us / +9.3% (worse)
macOS cprintf 50736 B 0 B / +0.0% 4409 B 0 B / +0.0% 2.038 s -95.59 ms / -4.5% (better) 19.581 ms +11.32 ms / +137.1% (worse)
macOS cprintf-lto 50496 B 0 B / +0.0% 161 B 0 B / +0.0% 1.610 s -276.8 ms / -14.7% (better) 6.605 ms +308.8 us / +4.9% (worse)
macOS fmtprintf 1773456 B 0 B / +0.0% 877780 B 0 B / +0.0% 7.399 s +662.5 ms / +9.8% (worse) 11.189 ms -704.8 us / -5.9% (better)
macOS fmtprintf-lto 1360928 B 0 B / +0.0% 762428 B 0 B / +0.0% 13.703 s +14.48 ms / +0.1% (worse) 4.171 ms -1.009 ms / -19.5% (better)
macOS println 99344 B 0 B / +0.0% 24216 B 0 B / +0.0% 1.486 s -356.7 ms / -19.4% (better) 5.512 ms -5.382 ms / -49.4% (better)
macOS println-lto 83664 B 0 B / +0.0% 21457 B 0 B / +0.0% 1.733 s -124.5 ms / -6.7% (better) 4.377 ms -1.949 ms / -30.8% (better)
Windows MinGW cprintf 651264 B 0 B / +0.0% 4550 B 0 B / +0.0% 1.951 s +187.1 ms / +10.6% (worse) 4.389 ms +465 us / +11.9% (worse)
Windows MinGW cprintf-lto 43520 B 0 B / +0.0% 4486 B 0 B / +0.0% 1.987 s +180.1 ms / +10.0% (worse) 3.935 ms +124.7 us / +3.3% (worse)
Windows MinGW fmtprintf 5432832 B 0 B / +0.0% 600310 B 0 B / +0.0% 8.320 s +819.7 ms / +10.9% (worse) 12.256 ms +3.84 ms / +45.6% (worse)
Windows MinGW fmtprintf-lto 4127232 B 0 B / +0.0% 546582 B 0 B / +0.0% 16.425 s +169.8 ms / +1.0% (worse) 9.053 ms -1.134 ms / -11.1% (better)
Windows MinGW println 706560 B 0 B / +0.0% 25190 B 0 B / +0.0% 1.948 s +191.3 ms / +10.9% (worse) 7.803 ms +1.158 ms / +17.4% (worse)
Windows MinGW println-lto 208896 B 0 B / +0.0% 22054 B 0 B / +0.0% 2.274 s +181.4 ms / +8.7% (worse) 8.618 ms +1.259 ms / +17.1% (worse)
Windows MinGW 386 cprintf 601600 B 0 B / +0.0% 5326 B 0 B / +0.0% 1.691 s +13.27 ms / +0.8% (worse) 5.582 ms +495 us / +9.7% (worse)
Windows MinGW 386 cprintf-lto 103424 B 0 B / +0.0% 5094 B 0 B / +0.0% 1.749 s +22.39 ms / +1.3% (worse) 5.396 ms +254.2 us / +4.9% (worse)
Windows MinGW 386 fmtprintf 4745216 B 0 B / +0.0% 472478 B 0 B / +0.0% 7.384 s +77.46 ms / +1.1% (worse) 11.380 ms -194.9 us / -1.7% (better)
Windows MinGW 386 fmtprintf-lto 4148736 B 0 B / +0.0% 451114 B 0 B / +0.0% 14.891 s +97.01 ms / +0.7% (worse) 10.614 ms -536.1 us / -4.8% (better)
Windows MinGW 386 println 653312 B 0 B / +0.0% 21490 B 0 B / +0.0% 1.718 s +22.95 ms / +1.4% (worse) 9.044 ms -8.9 us / -0.1% (better)
Windows MinGW 386 println-lto 258560 B 0 B / +0.0% 19306 B 0 B / +0.0% 1.966 s -23.43 ms / -1.2% (better) 8.971 ms -133.4 us / -1.5% (better)
Windows MinGW ARM64 cprintf 661504 B 0 B / +0.0% 4408 B 0 B / +0.0% 1.977 s +32.3 ms / +1.7% (worse) 7.069 ms -27.4 us / -0.4% (better)
Windows MinGW ARM64 cprintf-lto 43520 B 0 B / +0.0% 4340 B 0 B / +0.0% 2.003 s +44.79 ms / +2.3% (worse) 6.927 ms +44.7 us / +0.6% (worse)
Windows MinGW ARM64 fmtprintf 5343744 B 0 B / +0.0% 510876 B 0 B / +0.0% 7.348 s +106 ms / +1.5% (worse) 14.088 ms -181.7 us / -1.3% (better)
Windows MinGW ARM64 fmtprintf-lto 4302336 B 0 B / +0.0% 477264 B 0 B / +0.0% 14.259 s +86.09 ms / +0.6% (worse) 14.052 ms +200 ns / +0.001423% (worse)
Windows MinGW ARM64 println 714240 B 0 B / +0.0% 23884 B 0 B / +0.0% 1.968 s +23.04 ms / +1.2% (worse) 11.692 ms -100.8 us / -0.9% (better)
Windows MinGW ARM64 println-lto 215552 B 0 B / +0.0% 21232 B 0 B / +0.0% 2.247 s +51.8 ms / +2.4% (worse) 11.358 ms -895.5 us / -7.3% (better)
Windows MSVC cprintf 893952 B 0 B / +0.0% 65798 B 0 B / +0.0% 1.568 s -92.36 ms / -5.6% (better) 4.461 ms +1.115 ms / +33.3% (worse)
Windows MSVC cprintf-lto 289792 B 0 B / +0.0% 65734 B 0 B / +0.0% 1.591 s -116 ms / -6.8% (better) 3.571 ms -298.6 us / -7.7% (better)
Windows MSVC fmtprintf 5732864 B 0 B / +0.0% 695862 B 0 B / +0.0% 7.021 s -63.62 ms / -0.9% (better) 8.671 ms -887.2 us / -9.3% (better)
Windows MSVC fmtprintf-lto 4449792 B 0 B / +0.0% 646134 B 0 B / +0.0% 13.768 s -81.52 ms / -0.6% (better) 8.817 ms -145.7 us / -1.6% (better)
Windows MSVC println 1017344 B 0 B / +0.0% 120854 B 0 B / +0.0% 1.537 s -80.33 ms / -5.0% (better) 7.148 ms -386.7 us / -5.1% (better)
Windows MSVC println-lto 528384 B 0 B / +0.0% 118390 B 0 B / +0.0% 1.805 s -83.59 ms / -4.4% (better) 8.220 ms +850.4 us / +11.5% (worse)
Windows MSVC 386 cprintf 513536 B 0 B / +0.0% 3931 B 0 B / +0.0% 1.631 s +201.2 ms / +14.1% (worse) 5.793 ms +23.8 us / +0.4% (worse)
Windows MSVC 386 cprintf-lto 44032 B 0 B / +0.0% 3853 B 0 B / +0.0% 1.493 s -45.45 ms / -3.0% (better) 5.891 ms -63.9 us / -1.1% (better)
Windows MSVC 386 fmtprintf 4479488 B 0 B / +0.0% 455868 B 0 B / +0.0% 6.764 s -3.039 ms / -0.04491% (better) 12.155 ms +404.7 us / +3.4% (worse)
Windows MSVC 386 fmtprintf-lto 3899392 B 0 B / +0.0% 426651 B 0 B / +0.0% 13.767 s +773.3 ms / +6.0% (worse) 11.972 ms -732.2 us / -5.8% (better)
Windows MSVC 386 println 567296 B 0 B / +0.0% 20340 B 0 B / +0.0% 1.443 s +10.69 ms / +0.7% (worse) 9.936 ms +437.4 us / +4.6% (worse)
Windows MSVC 386 println-lto 199168 B 0 B / +0.0% 18501 B 0 B / +0.0% 1.682 s +12.04 ms / +0.7% (worse) 10.143 ms -418.1 us / -4.0% (better)
Windows MSVC ARM64 cprintf 662528 B 0 B / +0.0% 4192 B 0 B / +0.0% 1.597 s -20.99 ms / -1.3% (better) 6.959 ms -185.6 us / -2.6% (better)
Windows MSVC ARM64 cprintf-lto 47616 B 0 B / +0.0% 4084 B 0 B / +0.0% 1.654 s +22.51 ms / +1.4% (worse) 6.849 ms -261.4 us / -3.7% (better)
Windows MSVC ARM64 fmtprintf 5339648 B 0 B / +0.0% 510808 B 0 B / +0.0% 6.717 s -56.29 ms / -0.8% (better) 14.625 ms -194.5 us / -1.3% (better)
Windows MSVC ARM64 fmtprintf-lto 4309504 B 0 B / +0.0% 477924 B 0 B / +0.0% 13.005 s +30.98 ms / +0.2% (worse) 15.305 ms +717.8 us / +4.9% (worse)
Windows MSVC ARM64 println 715264 B 0 B / +0.0% 23908 B 0 B / +0.0% 1.637 s +14.31 ms / +0.9% (worse) 12.261 ms +375.3 us / +3.2% (worse)
Windows MSVC ARM64 println-lto 220672 B 0 B / +0.0% 21380 B 0 B / +0.0% 1.882 s +41.69 ms / +2.3% (worse) 11.809 ms +120 us / +1.0% (worse)
Core language and compiler benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkLookupPCRandom 14.690 ns/op 0 ns/op / +0.0%
Linux BenchmarkMergeCompilerFlags 204 ns/op +1.8 ns/op / +0.9% (worse)
Linux BenchmarkMergeLinkerFlags 139.200 ns/op -3.4 ns/op / -2.4% (better)
Linux BenchmarkChannelBuffered 55.470 ns/op +0.47 ns/op / +0.9% (worse)
Linux BenchmarkChannelHandoff 13165 ns/op -1398 ns/op / -9.6% (better)
Linux BenchmarkDefer 47.850 ns/op -0.44 ns/op / -0.9% (better)
Linux BenchmarkDirectCall 1.166 ns/op +0.002 ns/op / +0.2% (worse)
Linux BenchmarkGlobalRead 1.165 ns/op -0.001 ns/op / -0.1% (better)
Linux BenchmarkGlobalWrite 7.758 ns/op +0.007 ns/op / +0.1% (worse)
Linux BenchmarkGoroutine 26042 ns/op -139 ns/op / -0.5% (better)
Linux BenchmarkInterfaceCall 5.832 ns/op +0.016 ns/op / +0.3% (worse)
Linux BenchmarkRuntimeGetG 3.040 ns/op +0.031 ns/op / +1.0% (worse)
macOS BenchmarkLookupPCRandom 15.360 ns/op +2.19 ns/op / +16.6% (worse)
macOS BenchmarkMergeCompilerFlags 135.100 ns/op +25.1 ns/op / +22.8% (worse)
macOS BenchmarkMergeLinkerFlags 93.770 ns/op +5.74 ns/op / +6.5% (worse)
macOS BenchmarkChannelBuffered 26.380 ns/op -10.15 ns/op / -27.8% (better)
macOS BenchmarkChannelHandoff 6114 ns/op -6641 ns/op / -52.1% (better)
macOS BenchmarkDefer 36.720 ns/op -14.62 ns/op / -28.5% (better)
macOS BenchmarkDirectCall 1.119 ns/op -0.151 ns/op / -11.9% (better)
macOS BenchmarkGlobalRead 1.227 ns/op -0.104 ns/op / -7.8% (better)
macOS BenchmarkGlobalWrite 1.386 ns/op -0.15 ns/op / -9.8% (better)
macOS BenchmarkGoroutine 75304 ns/op +8946 ns/op / +13.5% (worse)
macOS BenchmarkInterfaceCall 4.824 ns/op -0.617 ns/op / -11.3% (better)
macOS BenchmarkRuntimeGetG 2.109 ns/op -0.613 ns/op / -22.5% (better)
Windows MinGW BenchmarkLookupPCRandom 12.370 ns/op -0.06 ns/op / -0.5% (better)
Windows MinGW BenchmarkMergeCompilerFlags 560.300 ns/op +1.7 ns/op / +0.3% (worse)
Windows MinGW BenchmarkMergeLinkerFlags 492.700 ns/op +16.1 ns/op / +3.4% (worse)
Windows MinGW BenchmarkChannelBuffered 30.440 ns/op -0.7 ns/op / -2.2% (better)
Windows MinGW BenchmarkChannelHandoff 1302 ns/op -16 ns/op / -1.2% (better)
Windows MinGW BenchmarkDefer 55.660 ns/op -2.18 ns/op / -3.8% (better)
Windows MinGW BenchmarkDirectCall 1.748 ns/op +0.002 ns/op / +0.1% (worse)
Windows MinGW BenchmarkGlobalRead 1.746 ns/op -0.002 ns/op / -0.1% (better)
Windows MinGW BenchmarkGlobalWrite 2.790 ns/op -0.001 ns/op / -0.03583% (better)
Windows MinGW BenchmarkGoroutine 76271 ns/op -2023 ns/op / -2.6% (better)
Windows MinGW BenchmarkInterfaceCall 8.750 ns/op -0.002 ns/op / -0.02285% (better)
Windows MinGW BenchmarkRuntimeGetG 2.450 ns/op -0.001 ns/op / -0.0408% (better)
Windows MinGW 386 BenchmarkLookupPCRandom 27.860 ns/op +0.06 ns/op / +0.2% (worse)
Windows MinGW 386 BenchmarkMergeCompilerFlags 746.200 ns/op -15.6 ns/op / -2.0% (better)
Windows MinGW 386 BenchmarkMergeLinkerFlags 704.800 ns/op -16.2 ns/op / -2.2% (better)
Windows MinGW 386 BenchmarkChannelBuffered 43.820 ns/op +0.1 ns/op / +0.2% (worse)
Windows MinGW 386 BenchmarkChannelHandoff 960.800 ns/op -14.2 ns/op / -1.5% (better)
Windows MinGW 386 BenchmarkDefer 43.880 ns/op -2.93 ns/op / -6.3% (better)
Windows MinGW 386 BenchmarkDirectCall 1.748 ns/op -0.042 ns/op / -2.3% (better)
Windows MinGW 386 BenchmarkGlobalRead 1.746 ns/op -0.043 ns/op / -2.4% (better)
Windows MinGW 386 BenchmarkGlobalWrite 8.992 ns/op -0.137 ns/op / -1.5% (better)
Windows MinGW 386 BenchmarkGoroutine 94123 ns/op -83 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkInterfaceCall 9.439 ns/op -0.073 ns/op / -0.8% (better)
Windows MinGW 386 BenchmarkRuntimeGetG 2.099 ns/op -0.002 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkLookupPCRandom 12.030 ns/op -0.08 ns/op / -0.7% (better)
Windows MinGW ARM64 BenchmarkMergeCompilerFlags 627.100 ns/op +52.8 ns/op / +9.2% (worse)
Windows MinGW ARM64 BenchmarkMergeLinkerFlags 585.100 ns/op +61.6 ns/op / +11.8% (worse)
Windows MinGW ARM64 BenchmarkChannelBuffered 37.600 ns/op -1.35 ns/op / -3.5% (better)
Windows MinGW ARM64 BenchmarkChannelHandoff 1979 ns/op -238 ns/op / -10.7% (better)
Windows MinGW ARM64 BenchmarkDefer 55.460 ns/op -1.17 ns/op / -2.1% (better)
Windows MinGW ARM64 BenchmarkDirectCall 0.663 ns/op +0.0001 ns/op / +0.01508% (worse)
Windows MinGW ARM64 BenchmarkGlobalRead 0.664 ns/op +0.0003 ns/op / +0.04522% (worse)
Windows MinGW ARM64 BenchmarkGlobalWrite 0.737 ns/op +0.0003 ns/op / +0.04071% (worse)
Windows MinGW ARM64 BenchmarkGoroutine 63055 ns/op +533 ns/op / +0.9% (worse)
Windows MinGW ARM64 BenchmarkInterfaceCall 4.140 ns/op -0.007 ns/op / -0.2% (better)
Windows MinGW ARM64 BenchmarkRuntimeGetG 1.769 ns/op -0.037 ns/op / -2.0% (better)
Windows MSVC BenchmarkLookupPCRandom 13.110 ns/op -0.15 ns/op / -1.1% (better)
Windows MSVC BenchmarkMergeCompilerFlags 623.500 ns/op +9.8 ns/op / +1.6% (worse)
Windows MSVC BenchmarkMergeLinkerFlags 529.400 ns/op +10.8 ns/op / +2.1% (worse)
Windows MSVC BenchmarkChannelBuffered 29.710 ns/op +0.11 ns/op / +0.4% (worse)
Windows MSVC BenchmarkChannelHandoff 1121 ns/op +55 ns/op / +5.2% (worse)
Windows MSVC BenchmarkDefer 54.530 ns/op +0.59 ns/op / +1.1% (worse)
Windows MSVC BenchmarkDirectCall 1.549 ns/op 0 ns/op / +0.0%
Windows MSVC BenchmarkGlobalRead 1.556 ns/op +0.008 ns/op / +0.5% (worse)
Windows MSVC BenchmarkGlobalWrite 2.469 ns/op -0.001 ns/op / -0.04049% (better)
Windows MSVC BenchmarkGoroutine 86730 ns/op -2797 ns/op / -3.1% (better)
Windows MSVC BenchmarkInterfaceCall 8.994 ns/op -0.011 ns/op / -0.1% (better)
Windows MSVC BenchmarkRuntimeGetG 2.479 ns/op -0.022 ns/op / -0.9% (better)
Windows MSVC 386 BenchmarkLookupPCRandom 70.110 ns/op -0.05 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkMergeCompilerFlags 793.400 ns/op +10.9 ns/op / +1.4% (worse)
Windows MSVC 386 BenchmarkMergeLinkerFlags 738.800 ns/op +2 ns/op / +0.3% (worse)
Windows MSVC 386 BenchmarkChannelBuffered 55.600 ns/op +0.8 ns/op / +1.5% (worse)
Windows MSVC 386 BenchmarkChannelHandoff 1387 ns/op -4328 ns/op / -75.7% (better)
Windows MSVC 386 BenchmarkDefer 49.840 ns/op -0.39 ns/op / -0.8% (better)
Windows MSVC 386 BenchmarkDirectCall 1.026 ns/op -0.075 ns/op / -6.8% (better)
Windows MSVC 386 BenchmarkGlobalRead 0.991 ns/op -0.036 ns/op / -3.5% (better)
Windows MSVC 386 BenchmarkGlobalWrite 17.360 ns/op -0.03 ns/op / -0.2% (better)
Windows MSVC 386 BenchmarkGoroutine 243228 ns/op +5479 ns/op / +2.3% (worse)
Windows MSVC 386 BenchmarkInterfaceCall 5.266 ns/op -0.205 ns/op / -3.7% (better)
Windows MSVC 386 BenchmarkRuntimeGetG 1.637 ns/op 0 ns/op / +0.0%
Windows MSVC ARM64 BenchmarkLookupPCRandom 12.110 ns/op -0.02 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkMergeCompilerFlags 575.500 ns/op +12.2 ns/op / +2.2% (worse)
Windows MSVC ARM64 BenchmarkMergeLinkerFlags 538.400 ns/op +3.5 ns/op / +0.7% (worse)
Windows MSVC ARM64 BenchmarkChannelBuffered 37.550 ns/op -0.02 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkChannelHandoff 2195 ns/op -103 ns/op / -4.5% (better)
Windows MSVC ARM64 BenchmarkDefer 62.210 ns/op +0.28 ns/op / +0.5% (worse)
Windows MSVC ARM64 BenchmarkDirectCall 0.663 ns/op +0.0003 ns/op / +0.04524% (worse)
Windows MSVC ARM64 BenchmarkGlobalRead 0.664 ns/op +0.0001 ns/op / +0.01507% (worse)
Windows MSVC ARM64 BenchmarkGlobalWrite 3.798 ns/op +0.004 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkGoroutine 59913 ns/op -1411 ns/op / -2.3% (better)
Windows MSVC ARM64 BenchmarkInterfaceCall 4.147 ns/op +0.007 ns/op / +0.2% (worse)
Windows MSVC ARM64 BenchmarkRuntimeGetG 1.768 ns/op -0.003 ns/op / -0.2% (better)
Timer runtime benchmarks
Platform Operation and runtime ns/op vs base
Linux AfterFuncZeroDelivery/Go 914.500 ns/op +2.8 ns/op / +0.3% (worse)
Linux AfterFuncZeroDelivery/LLGo 47475 ns/op -1002 ns/op / -2.1% (better)
Linux CreateStop/Go 304.300 ns/op +2.1 ns/op / +0.7% (worse)
Linux CreateStop/LLGo 1583 ns/op -6 ns/op / -0.4% (better)
Linux RearmStopped/Go 115.800 ns/op -0.1 ns/op / -0.1% (better)
Linux RearmStopped/LLGo 1236 ns/op +47 ns/op / +4.0% (worse)
Linux ResetActive/Go 68.690 ns/op +0.14 ns/op / +0.2% (worse)
Linux ResetActive/LLGo 702.800 ns/op -97.5 ns/op / -12.2% (better)
Linux ResetHeap1024/Go 67.100 ns/op -0.31 ns/op / -0.5% (better)
Linux ResetHeap1024/LLGo 181.400 ns/op -1.1 ns/op / -0.6% (better)
macOS AfterFuncZeroDelivery/Go 835.300 ns/op +381.3 ns/op / +84.0% (worse)
macOS AfterFuncZeroDelivery/LLGo 137379 ns/op +51703 ns/op / +60.3% (worse)
macOS CreateStop/Go 256.200 ns/op +99.9 ns/op / +63.9% (worse)
macOS CreateStop/LLGo 813.700 ns/op +337.7 ns/op / +70.9% (worse)
macOS RearmStopped/Go 111.900 ns/op +37.56 ns/op / +50.5% (worse)
macOS RearmStopped/LLGo 565.600 ns/op +213.8 ns/op / +60.8% (worse)
macOS ResetActive/Go 90.710 ns/op +39.69 ns/op / +77.8% (worse)
macOS ResetActive/LLGo 229.200 ns/op +57.2 ns/op / +33.3% (worse)
macOS ResetHeap1024/Go 80.470 ns/op +33.86 ns/op / +72.6% (worse)
macOS ResetHeap1024/LLGo 123.900 ns/op +23.6 ns/op / +23.5% (worse)
Windows MinGW AfterFuncZeroDelivery/Go 487.100 ns/op -45.2 ns/op / -8.5% (better)
Windows MinGW AfterFuncZeroDelivery/LLGo 147435 ns/op -2564 ns/op / -1.7% (better)
Windows MinGW CreateStop/Go 120.700 ns/op -1.3 ns/op / -1.1% (better)
Windows MinGW CreateStop/LLGo 499.400 ns/op +14.9 ns/op / +3.1% (worse)
Windows MinGW RearmStopped/Go 31.540 ns/op -0.04 ns/op / -0.1% (better)
Windows MinGW RearmStopped/LLGo 285 ns/op -6.5 ns/op / -2.2% (better)
Windows MinGW ResetActive/Go 19.080 ns/op +0.01 ns/op / +0.1% (worse)
Windows MinGW ResetActive/LLGo 160.900 ns/op -9.6 ns/op / -5.6% (better)
Windows MinGW ResetHeap1024/Go 19.140 ns/op +0.07 ns/op / +0.4% (worse)
Windows MinGW ResetHeap1024/LLGo 138.900 ns/op -0.1 ns/op / -0.1% (better)
Windows MinGW 386 AfterFuncZeroDelivery/Go 1007 ns/op +15.4 ns/op / +1.6% (worse)
Windows MinGW 386 AfterFuncZeroDelivery/LLGo 164860 ns/op -4229 ns/op / -2.5% (better)
Windows MinGW 386 CreateStop/Go 222 ns/op +7.6 ns/op / +3.5% (worse)
Windows MinGW 386 CreateStop/LLGo 524.200 ns/op -0.8 ns/op / -0.2% (better)
Windows MinGW 386 RearmStopped/Go 73.250 ns/op +0.2 ns/op / +0.3% (worse)
Windows MinGW 386 RearmStopped/LLGo 353 ns/op -4.1 ns/op / -1.1% (better)
Windows MinGW 386 ResetActive/Go 41.970 ns/op -0.09 ns/op / -0.2% (better)
Windows MinGW 386 ResetActive/LLGo 1046 ns/op +775.5 ns/op / +286.7% (worse)
Windows MinGW 386 ResetHeap1024/Go 42.320 ns/op -0.13 ns/op / -0.3% (better)
Windows MinGW 386 ResetHeap1024/LLGo 193.100 ns/op -1 ns/op / -0.5% (better)
Windows MinGW ARM64 AfterFuncZeroDelivery/Go 663.900 ns/op +4.7 ns/op / +0.7% (worse)
Windows MinGW ARM64 AfterFuncZeroDelivery/LLGo 152601 ns/op +3369 ns/op / +2.3% (worse)
Windows MinGW ARM64 CreateStop/Go 198 ns/op +1.5 ns/op / +0.8% (worse)
Windows MinGW ARM64 CreateStop/LLGo 373.200 ns/op +3.3 ns/op / +0.9% (worse)
Windows MinGW ARM64 RearmStopped/Go 70.540 ns/op 0 ns/op / +0.0%
Windows MinGW ARM64 RearmStopped/LLGo 248.700 ns/op -2.5 ns/op / -1.0% (better)
Windows MinGW ARM64 ResetActive/Go 31.100 ns/op -0.06 ns/op / -0.2% (better)
Windows MinGW ARM64 ResetActive/LLGo 125.900 ns/op +2.8 ns/op / +2.3% (worse)
Windows MinGW ARM64 ResetHeap1024/Go 31.180 ns/op +0.09 ns/op / +0.3% (worse)
Windows MinGW ARM64 ResetHeap1024/LLGo 124.700 ns/op +0.6 ns/op / +0.5% (worse)
Windows MSVC AfterFuncZeroDelivery/Go 560.800 ns/op +6.4 ns/op / +1.2% (worse)
Windows MSVC AfterFuncZeroDelivery/LLGo 175269 ns/op +1229 ns/op / +0.7% (worse)
Windows MSVC CreateStop/Go 115.600 ns/op -1.8 ns/op / -1.5% (better)
Windows MSVC CreateStop/LLGo 416.700 ns/op -18.2 ns/op / -4.2% (better)
Windows MSVC RearmStopped/Go 31.520 ns/op +0.18 ns/op / +0.6% (worse)
Windows MSVC RearmStopped/LLGo 248.500 ns/op -7.4 ns/op / -2.9% (better)
Windows MSVC ResetActive/Go 19.980 ns/op -0.1 ns/op / -0.5% (better)
Windows MSVC ResetActive/LLGo 145.300 ns/op +4.9 ns/op / +3.5% (worse)
Windows MSVC ResetHeap1024/Go 20.520 ns/op +0.03 ns/op / +0.1% (worse)
Windows MSVC ResetHeap1024/LLGo 125.700 ns/op -0.9 ns/op / -0.7% (better)
Windows MSVC 386 AfterFuncZeroDelivery/Go 1006 ns/op -6 ns/op / -0.6% (better)
Windows MSVC 386 AfterFuncZeroDelivery/LLGo 344490 ns/op +110 ns/op / +0.03194% (worse)
Windows MSVC 386 CreateStop/Go 258.300 ns/op -0.1 ns/op / -0.0387% (better)
Windows MSVC 386 CreateStop/LLGo 722.300 ns/op +77.7 ns/op / +12.1% (worse)
Windows MSVC 386 RearmStopped/Go 93.950 ns/op +0.09 ns/op / +0.1% (worse)
Windows MSVC 386 RearmStopped/LLGo 456.500 ns/op +57.7 ns/op / +14.5% (worse)
Windows MSVC 386 ResetActive/Go 45.230 ns/op -0.13 ns/op / -0.3% (better)
Windows MSVC 386 ResetActive/LLGo 354.400 ns/op +38.9 ns/op / +12.3% (worse)
Windows MSVC 386 ResetHeap1024/Go 45.520 ns/op -0.24 ns/op / -0.5% (better)
Windows MSVC 386 ResetHeap1024/LLGo 166.200 ns/op -1.2 ns/op / -0.7% (better)
Windows MSVC ARM64 AfterFuncZeroDelivery/Go 662.200 ns/op +10.9 ns/op / +1.7% (worse)
Windows MSVC ARM64 AfterFuncZeroDelivery/LLGo 170907 ns/op +1470 ns/op / +0.9% (worse)
Windows MSVC ARM64 CreateStop/Go 196.100 ns/op -2.4 ns/op / -1.2% (better)
Windows MSVC ARM64 CreateStop/LLGo 461.100 ns/op +13.4 ns/op / +3.0% (worse)
Windows MSVC ARM64 RearmStopped/Go 70.580 ns/op -0.08 ns/op / -0.1% (better)
Windows MSVC ARM64 RearmStopped/LLGo 284 ns/op -4.9 ns/op / -1.7% (better)
Windows MSVC ARM64 ResetActive/Go 30.980 ns/op -0.15 ns/op / -0.5% (better)
Windows MSVC ARM64 ResetActive/LLGo 149.900 ns/op +2.2 ns/op / +1.5% (worse)
Windows MSVC ARM64 ResetHeap1024/Go 31.120 ns/op +0.03 ns/op / +0.1% (worse)
Windows MSVC ARM64 ResetHeap1024/LLGo 134.800 ns/op -3.6 ns/op / -2.6% (better)

Compared with 5f1f13897af7 measured in the same runner job.

@cpunion
cpunion force-pushed the codex/fix-size-build-blockers-2679-20261003 branch from e56127e to d85c64f Compare October 3, 2026 05:29

@zhouguangyuan0718 zhouguangyuan0718 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the C-only deadcode-linking and WASI LTO changes. Focused build/crosscompile tests passed. Validated C-only ESP32C3 builds with both cold and warm caches, and built and executed the WASI Goexit/defer fixture with both Full and Thin LTO. No blocking findings in the reviewed changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants