Skip to content

windows: qualify debuggers and host shells (R12; depends on #2463) - #2465

Merged
xushiwei merged 54 commits into
xgo-dev:mainfrom
cpunion:codex/windows-r12-debug-shell-20260831
Aug 31, 2026
Merged

xushiwei merged 54 commits into
xgo-dev:mainfrom
cpunion:codex/windows-r12-debug-shell-20260831

Conversation

@cpunion

@cpunion cpunion commented Aug 31, 2026 •

Copy link
Copy Markdown
Collaborator

Purpose

Advance R12 of the Windows support proposal by qualifying debugger metadata and native host-shell invocation across the supported Windows profiles and architectures.

Related proposal: #2325

Depends on:

Current scope

  • extract and use the official target-native LLVM 19.1.7 LLDB installations for Windows/ARM64 and Windows/386 instead of asking the x64 debugger to cross architecture-specific exception dispatch;
  • pair those debuggers with their actual embedded Python ABIs (3.11 ARM64 and 3.10 x86), independently of the Python 3.12 demo target;
  • run LLDB integration on MSVC and MinGW for amd64, ARM64, and 386;
  • honor the configured LLGO_LLDB before probing PATH, so a cross-architecture lane cannot silently select the host debugger;
  • select the resolved source frame before evaluating variables, because Windows/386 can expose the WoW64 exception dispatcher as frame zero;
  • keep 64-bit integer debug values addressable on Windows/386 so LLVM cannot truncate an unsigned value to one 32-bit DWARF stack item;
  • preserve DWARF for package C/C++ sources whenever the typed Go debug policy preserves it, with no debug metadata added to normal -w or default release builds;
  • verify source breakpoints and ordered mixed Go -> C -> Go callback stacks, including a C nil-fault instruction reached through a callback boundary;
  • isolate the mixed-language stack fixture from the large variable-formatting fixture so foreign calls cannot perturb unrelated Go variable locations;
  • parse, verify, and semantically inspect LLGo DWARF in PE files at every optimization level;
  • retain the verifier fixture's COFF sections for both MSVC and MinGW, avoiding zero-address section-GC tombstones that llvm-dwarfdump --verify misdiagnoses while normal LLDB tests continue to exercise section GC;
  • preserve an explicit COFF /debug linker choice and emit CodeView file/line records for the companion PDB while retaining embedded DWARF;
  • verify that the PDB contains Go source files, Go public symbols, and usable line/address mappings;
  • run profile-preserving builds from PowerShell, cmd.exe, a fresh Visual Studio Developer Shell, MSYS2, and Cygwin;
  • keep shell scripts LF-terminated in Windows checkouts so the same checked-in host-shell qualification runs under MSYS2 and Cygwin;
  • reject accidental msys-2.0.dll, cygwin1.dll, and, for MSVC, libwinpthread dependencies in shell-produced executables.

The explicit-PDB path does not introduce a second Go type system in CodeView. The companion PDB provides discovery, public symbols, and source/line mappings; embedded DWARF remains the type authority. Default release builds and explicit /debug:none builds do not emit the extra metadata.

Validation

  • rebased without conflicts onto R11 head 14aedcde5; range-diff confirms all 25 functional R12 commits are unchanged apart from their rewritten parents;

  • the host-shell fix preserves architecture-selected compilers for non-amd64 targets and passes native Windows output/inspection paths explicitly from Cygwin, which unlike MSYS2 does not translate native-program arguments; no speculative DLL-path override remains;

  • go test -count=1 ./test/go ./ssa ./internal/build ./internal/debuginfo passes on macOS ARM64 (internal/build completed in 446s);

  • Windows/386 MSVC with official Win32 LLDB 19.1.7: 224/224 variable assertions and 3/3 mixed Go/C callback/fault-stack assertions pass, including all auxiliary marker/plugin checks;

  • Windows/386 MinGW with official Win32 LLDB 19.1.7: the same 224/224, 3/3, and auxiliary checks pass;

  • the MinGW/386 suite also passes with the host lldb first on PATH and the target-native debugger selected only through LLGO_LLDB;

  • Windows/ARM64 MinGW with native Go 1.27 and CLANGARM64 22.1.8: the complete test/go package passes with LLGO_TEST_JOBS=1;

  • Windows/amd64 MSVC TestStandardDWARF passes at O0, O1, O2, O3, Os, and Oz;

  • Python bytecode validation, YAML parsing, actionlint, and git diff --check pass;

  • the complete cpunion CI matrix passed on functional head 5ce14445e after retrying one transient Go 1.20 goroot hang: https://github.com/cpunion/llgo/actions/runs/33392286531;

  • same-runner benchmark comparison reports 0 B file-size and text-size changes for every Linux, macOS, Windows MinGW/MSVC, amd64/386/ARM64, LTO, and non-LTO workload: windows: qualify debuggers and host shells (R12; depends on xgo-dev/llgo#2463) cpunion/llgo#216 (comment).

  • final review-only head 9f0a5af09 passes go test -count=1 ./ssa ./internal/build; the complete upstream matrix passed after retrying one transient macOS test-process exit and one transient Windows module download: https://github.com/xgo-dev/llgo/actions/runs/33402640338.

cpunion added 30 commits August 31, 2026 20:18

@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.

Review summary

Reviewed the full diff (0b99651...5ce1444, ~2k lines) across four dimensions: code quality, performance, security, and documentation accuracy.

This is a large, well-structured PR adding Windows LLVM-MinGW cross-compilation, COFF PDB/CodeView debug-info handling, link-option parsing, and extensive CI/toolchain scripting. Strong points:

  • Security: all new binary downloads pin a version and verify a SHA-256 before use; vcpkg is cloned unpinned but immediately detached to a hardcoded baseline SHA. Actions interpolate only trusted matrix values, not untrusted PR context. No curl | sh, no injection surface introduced.
  • Performance: no hot-path regressions. needDebugAddr short-circuits before the one LLVM SizeOf call; the per-C-file debugInfoCompilerArgs re-parse is negligible against the clang subprocess it accompanies.
  • Documentation: new exported symbols (Program.EnableCodeViewDebugInfo, Config.EmitCodeView) and renamed helpers (usesWindowsToolchainProfile, ResolveWindows) have accurate, updated doc comments. User-facing docs remain consistent.
  • Tests: the "last /debug wins", "-w overrides external PDB", CodeView-retains-DWARF, and 386 wide-integer debug-value cases are all covered by new unit tests.

Only minor, non-blocking readability suggestions below. Nothing blocks merge.

Comment thread internal/build/link_options.go
Comment thread ssa/di.go Outdated
@codecov

codecov Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.66667% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/build/link_options.go 97.50% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown

LLGo baseline benchmarks

9f0a5af09580 | 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 19608 B 0 B / +0.0% 387 B 0 B / +0.0% 352.783 ms -8.54 ms / -2.4% (better) 1.271 ms -72.55 us / -5.4% (better)
Linux cprintf-lto 19440 B 0 B / +0.0% 368 B 0 B / +0.0% 363.336 ms +5.546 ms / +1.6% (worse) 1.304 ms -32.84 us / -2.5% (better)
Linux fmtprintf 1615576 B 0 B / +0.0% 493418 B 0 B / +0.0% 2.596 s -57.45 ms / -2.2% (better) 3.027 ms -394.3 us / -11.5% (better)
Linux fmtprintf-lto 1491368 B 0 B / +0.0% 453936 B 0 B / +0.0% 8.321 s -567.5 ms / -6.4% (better) 2.883 ms +35.06 us / +1.2% (worse)
Linux println 62808 B 0 B / +0.0% 15360 B 0 B / +0.0% 364.455 ms -182.2 us / -0.04997% (better) 1.642 ms -7.404 us / -0.4% (better)
Linux println-lto 54648 B 0 B / +0.0% 12985 B 0 B / +0.0% 541.366 ms -8.331 ms / -1.5% (better) 1.644 ms +18 us / +1.1% (worse)
macOS cprintf 84480 B 0 B / +0.0% 16845 B 0 B / +0.0% 357.790 ms +29.29 ms / +8.9% (worse) 2.081 ms -110.4 us / -5.0% (better)
macOS cprintf-lto 100704 B 0 B / +0.0% 16825 B 0 B / +0.0% 364.920 ms -940 us / -0.3% (better) 2.385 ms -542 ns / -0.02272% (better)
macOS fmtprintf 1473136 B 0 B / +0.0% 869200 B 0 B / +0.0% 1.990 s +221.3 ms / +12.5% (worse) 3.683 ms -85.29 us / -2.3% (better)
macOS fmtprintf-lto 1176000 B 0 B / +0.0% 864760 B 0 B / +0.0% 5.350 s +455.9 ms / +9.3% (worse) 4.670 ms +426.5 us / +10.1% (worse)
macOS println 114944 B 0 B / +0.0% 35377 B 0 B / +0.0% 328.907 ms +4.774 ms / +1.5% (worse) 2.677 ms -48.17 us / -1.8% (better)
macOS println-lto 118736 B 0 B / +0.0% 33029 B 0 B / +0.0% 472.372 ms +2.876 ms / +0.6% (worse) 2.849 ms -254.1 us / -8.2% (better)
Windows MinGW cprintf 20480 B 0 B / +0.0% 4662 B 0 B / +0.0% 788.251 ms -13.13 ms / -1.6% (better) 3.749 ms +422.9 us / +12.7% (worse)
Windows MinGW cprintf-lto 18432 B 0 B / +0.0% 4582 B 0 B / +0.0% 808.683 ms -7.738 ms / -0.9% (better) 3.414 ms -1.028 ms / -23.1% (better)
Windows MinGW fmtprintf 1932800 B 0 B / +0.0% 597574 B 0 B / +0.0% 3.358 s +6.484 ms / +0.2% (worse) 7.826 ms +59.5 us / +0.8% (worse)
Windows MinGW fmtprintf-lto 1982464 B 0 B / +0.0% 589622 B 0 B / +0.0% 9.310 s +60.33 ms / +0.7% (worse) 8.138 ms +189.8 us / +2.4% (worse)
Windows MinGW println 74240 B 0 B / +0.0% 25014 B 0 B / +0.0% 815.163 ms +32.87 ms / +4.2% (worse) 6.583 ms -796.7 us / -10.8% (better)
Windows MinGW println-lto 67584 B 0 B / +0.0% 21830 B 0 B / +0.0% 1.016 s +15.68 ms / +1.6% (worse) 6.842 ms +35.6 us / +0.5% (worse)
Windows MinGW 386 cprintf 37888 B 0 B / +0.0% 5228 B 0 B / +0.0% 684.200 ms +11.69 ms / +1.7% (worse) 3.993 ms +85.7 us / +2.2% (worse)
Windows MinGW 386 cprintf-lto 21504 B 0 B / +0.0% 5028 B 0 B / +0.0% 695.196 ms +1.594 ms / +0.2% (worse) 3.956 ms -119.5 us / -2.9% (better)
Windows MinGW 386 fmtprintf 1947136 B 0 B / +0.0% 472062 B 0 B / +0.0% 2.800 s +82.86 ms / +3.0% (worse) 8.368 ms -65.1 us / -0.8% (better)
Windows MinGW 386 fmtprintf-lto 2188288 B 0 B / +0.0% 472002 B 0 B / +0.0% 7.939 s +35.41 ms / +0.4% (worse) 8.524 ms -13.3 us / -0.2% (better)
Windows MinGW 386 println 88064 B 0 B / +0.0% 20726 B 0 B / +0.0% 671.150 ms -27.9 us / -0.004157% (better) 6.618 ms -119.7 us / -1.8% (better)
Windows MinGW 386 println-lto 72192 B 0 B / +0.0% 18790 B 0 B / +0.0% 868.961 ms +1.101 ms / +0.1% (worse) 6.414 ms -296.9 us / -4.4% (better)
Windows MinGW ARM64 cprintf 19968 B 0 B / +0.0% 4632 B 0 B / +0.0% 1.047 s -23.32 ms / -2.2% (better) 7.780 ms +639.9 us / +9.0% (worse)
Windows MinGW ARM64 cprintf-lto 18432 B 0 B / +0.0% 4552 B 0 B / +0.0% 1.048 s -21.98 ms / -2.1% (better) 7.182 ms -368.5 us / -4.9% (better)
Windows MinGW ARM64 fmtprintf 1820160 B 0 B / +0.0% 510596 B 0 B / +0.0% 3.590 s +65.45 ms / +1.9% (worse) 15.278 ms +983.7 us / +6.9% (worse)
Windows MinGW ARM64 fmtprintf-lto 1886720 B 0 B / +0.0% 506320 B 0 B / +0.0% 9.218 s +155.8 ms / +1.7% (worse) 14.681 ms +139.4 us / +1.0% (worse)
Windows MinGW ARM64 println 71680 B 0 B / +0.0% 23832 B 0 B / +0.0% 1.017 s +15.02 ms / +1.5% (worse) 12.766 ms +346.1 us / +2.8% (worse)
Windows MinGW ARM64 println-lto 67072 B 0 B / +0.0% 21068 B 0 B / +0.0% 1.237 s +18.27 ms / +1.5% (worse) 12.794 ms -35.2 us / -0.3% (better)
Windows MSVC cprintf 12288 B 0 B / +0.0% 4438 B 0 B / +0.0% 571.216 ms -25.04 ms / -4.2% (better) 2.805 ms +5 us / +0.2% (worse)
Windows MSVC cprintf-lto 11776 B 0 B / +0.0% 4278 B 0 B / +0.0% 595.295 ms -18.62 ms / -3.0% (better) 2.759 ms -26.6 us / -1.0% (better)
Windows MSVC fmtprintf 1471488 B 0 B / +0.0% 597142 B 0 B / +0.0% 2.868 s +191.2 ms / +7.1% (worse) 6.901 ms +41.2 us / +0.6% (worse)
Windows MSVC fmtprintf-lto 1517056 B 0 B / +0.0% 596502 B 0 B / +0.0% 8.533 s +186.6 ms / +2.2% (worse) 8.001 ms +890.6 us / +12.5% (worse)
Windows MSVC println 47104 B 0 B / +0.0% 25030 B 0 B / +0.0% 630.663 ms +37.16 ms / +6.3% (worse) 5.713 ms +211.5 us / +3.8% (worse)
Windows MSVC println-lto 44032 B 0 B / +0.0% 22198 B 0 B / +0.0% 843.405 ms -34.37 ms / -3.9% (better) 5.485 ms -404.1 us / -6.9% (better)
Windows MSVC 386 cprintf 9728 B 0 B / +0.0% 3930 B 0 B / +0.0% 826.786 ms -3.066 ms / -0.4% (better) 5.590 ms +25.1 us / +0.5% (worse)
Windows MSVC 386 cprintf-lto 9216 B 0 B / +0.0% 3840 B 0 B / +0.0% 1.011 s +15.02 ms / +1.5% (worse) 8.144 ms +157.5 us / +2.0% (worse)
Windows MSVC 386 fmtprintf 1189888 B 0 B / +0.0% 456032 B 0 B / +0.0% 3.542 s +1.353 ms / +0.03822% (worse) 13.019 ms +1.542 ms / +13.4% (worse)
Windows MSVC 386 fmtprintf-lto 1252352 B 0 B / +0.0% 452437 B 0 B / +0.0% 10.331 s +97.81 ms / +1.0% (worse) 11.212 ms -378.9 us / -3.3% (better)
Windows MSVC 386 println 35328 B 0 B / +0.0% 19712 B 0 B / +0.0% 807.125 ms -18.56 ms / -2.2% (better) 9.290 ms -419.7 us / -4.3% (better)
Windows MSVC 386 println-lto 34304 B 0 B / +0.0% 17927 B 0 B / +0.0% 1.069 s -114 ms / -9.6% (better) 9.312 ms -644.7 us / -6.5% (better)
Windows MSVC ARM64 cprintf 11264 B 0 B / +0.0% 3976 B 0 B / +0.0% 1.675 s -42.6 ms / -2.5% (better) 7.415 ms +123.8 us / +1.7% (worse)
Windows MSVC ARM64 cprintf-lto 10752 B 0 B / +0.0% 3844 B 0 B / +0.0% 1.686 s +18.45 ms / +1.1% (worse) 6.476 ms -27.5 us / -0.4% (better)
Windows MSVC ARM64 fmtprintf 1365504 B 0 B / +0.0% 510268 B 0 B / +0.0% 5.721 s +197.7 ms / +3.6% (worse) 14.921 ms +1.927 ms / +14.8% (worse)
Windows MSVC ARM64 fmtprintf-lto 1413120 B 0 B / +0.0% 507148 B 0 B / +0.0% 17.152 s +321.3 ms / +1.9% (worse) 14.614 ms +1.379 ms / +10.4% (worse)
Windows MSVC ARM64 println 43008 B 0 B / +0.0% 22824 B 0 B / +0.0% 1.636 s +13.75 ms / +0.8% (worse) 12.551 ms -104.8 us / -0.8% (better)
Windows MSVC ARM64 println-lto 40960 B 0 B / +0.0% 20732 B 0 B / +0.0% 2.083 s +11.03 ms / +0.5% (worse) 12.338 ms -786.3 us / -6.0% (better)
Core language and compiler benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkLookupPCRandom 13.810 ns/op +0.45 ns/op / +3.4% (worse)
Linux BenchmarkMergeCompilerFlags 139.800 ns/op -0.6 ns/op / -0.4% (better)
Linux BenchmarkMergeLinkerFlags 90.690 ns/op +1.52 ns/op / +1.7% (worse)
Linux BenchmarkChannelBuffered 36.470 ns/op -0.03 ns/op / -0.1% (better)
Linux BenchmarkChannelHandoff 29142 ns/op +1332 ns/op / +4.8% (worse)
Linux BenchmarkDefer 44.390 ns/op -2.77 ns/op / -5.9% (better)
Linux BenchmarkDirectCall 1.557 ns/op 0 ns/op / +0.0%
Linux BenchmarkGlobalRead 1.870 ns/op +0.001 ns/op / +0.1% (worse)
Linux BenchmarkGlobalWrite 2.488 ns/op 0 ns/op / +0.0%
Linux BenchmarkGoroutine 31704 ns/op -943 ns/op / -2.9% (better)
Linux BenchmarkInterfaceCall 7.784 ns/op -0.003 ns/op / -0.03853% (better)
Linux BenchmarkRuntimeGetG 1.870 ns/op +0.002 ns/op / +0.1% (worse)
macOS BenchmarkLookupPCRandom 12.200 ns/op +0.99 ns/op / +8.8% (worse)
macOS BenchmarkMergeCompilerFlags 106.200 ns/op +16.85 ns/op / +18.9% (worse)
macOS BenchmarkMergeLinkerFlags 65.970 ns/op +7.99 ns/op / +13.8% (worse)
macOS BenchmarkChannelBuffered 24.270 ns/op +0.22 ns/op / +0.9% (worse)
macOS BenchmarkChannelHandoff 8898 ns/op +896 ns/op / +11.2% (worse)
macOS BenchmarkDefer 32.540 ns/op +0.67 ns/op / +2.1% (worse)
macOS BenchmarkDirectCall 1.036 ns/op +0.0536 ns/op / +5.5% (worse)
macOS BenchmarkGlobalRead 1.051 ns/op +0.0975 ns/op / +10.2% (worse)
macOS BenchmarkGlobalWrite 1.057 ns/op +0.0992 ns/op / +10.4% (worse)
macOS BenchmarkGoroutine 24281 ns/op -3639 ns/op / -13.0% (better)
macOS BenchmarkInterfaceCall 4.776 ns/op +0.309 ns/op / +6.9% (worse)
macOS BenchmarkRuntimeGetG 2.108 ns/op -0.042 ns/op / -2.0% (better)
Windows MinGW BenchmarkLookupPCRandom 12.500 ns/op +0.07 ns/op / +0.6% (worse)
Windows MinGW BenchmarkMergeCompilerFlags 538.700 ns/op -8.6 ns/op / -1.6% (better)
Windows MinGW BenchmarkMergeLinkerFlags 464.400 ns/op -4 ns/op / -0.9% (better)
Windows MinGW BenchmarkChannelBuffered 38.960 ns/op -0.01 ns/op / -0.02566% (better)
Windows MinGW BenchmarkChannelHandoff 1335 ns/op -67 ns/op / -4.8% (better)
Windows MinGW BenchmarkDefer 56.390 ns/op +0.2 ns/op / +0.4% (worse)
Windows MinGW BenchmarkDirectCall 2.097 ns/op +0.001 ns/op / +0.04771% (worse)
Windows MinGW BenchmarkGlobalRead 1.748 ns/op 0 ns/op / +0.0%
Windows MinGW BenchmarkGlobalWrite 2.786 ns/op -0.002 ns/op / -0.1% (better)
Windows MinGW BenchmarkGoroutine 69046 ns/op +297 ns/op / +0.4% (worse)
Windows MinGW BenchmarkInterfaceCall 10.150 ns/op +0.01 ns/op / +0.1% (worse)
Windows MinGW BenchmarkRuntimeGetG 3.154 ns/op +0.005 ns/op / +0.2% (worse)
Windows MinGW 386 BenchmarkLookupPCRandom 21.550 ns/op 0 ns/op / +0.0%
Windows MinGW 386 BenchmarkMergeCompilerFlags 602.200 ns/op +43.6 ns/op / +7.8% (worse)
Windows MinGW 386 BenchmarkMergeLinkerFlags 527.400 ns/op +4.9 ns/op / +0.9% (worse)
Windows MinGW 386 BenchmarkChannelBuffered 36.840 ns/op +0.08 ns/op / +0.2% (worse)
Windows MinGW 386 BenchmarkChannelHandoff 739.400 ns/op +56.5 ns/op / +8.3% (worse)
Windows MinGW 386 BenchmarkDefer 33.850 ns/op -0.51 ns/op / -1.5% (better)
Windows MinGW 386 BenchmarkDirectCall 1.357 ns/op 0 ns/op / +0.0%
Windows MinGW 386 BenchmarkGlobalRead 1.357 ns/op -0.001 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkGlobalWrite 6.975 ns/op -0.006 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkGoroutine 56095 ns/op -2052 ns/op / -3.5% (better)
Windows MinGW 386 BenchmarkInterfaceCall 8.688 ns/op -0.006 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkRuntimeGetG 1.378 ns/op +0.002 ns/op / +0.1% (worse)
Windows MinGW ARM64 BenchmarkLookupPCRandom 12.050 ns/op -0.26 ns/op / -2.1% (better)
Windows MinGW ARM64 BenchmarkMergeCompilerFlags 572.500 ns/op -7 ns/op / -1.2% (better)
Windows MinGW ARM64 BenchmarkMergeLinkerFlags 546.200 ns/op -0.8 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkChannelBuffered 43.140 ns/op +0.11 ns/op / +0.3% (worse)
Windows MinGW ARM64 BenchmarkChannelHandoff 2351 ns/op -254 ns/op / -9.8% (better)
Windows MinGW ARM64 BenchmarkDefer 57.450 ns/op -2.27 ns/op / -3.8% (better)
Windows MinGW ARM64 BenchmarkDirectCall 0.591 ns/op -0.0013 ns/op / -0.2% (better)
Windows MinGW ARM64 BenchmarkGlobalRead 0.737 ns/op -0.0036 ns/op / -0.5% (better)
Windows MinGW ARM64 BenchmarkGlobalWrite 0.664 ns/op -0.002 ns/op / -0.3% (better)
Windows MinGW ARM64 BenchmarkGoroutine 61430 ns/op -2882 ns/op / -4.5% (better)
Windows MinGW ARM64 BenchmarkInterfaceCall 4.721 ns/op -0.023 ns/op / -0.5% (better)
Windows MinGW ARM64 BenchmarkRuntimeGetG 1.808 ns/op +0.038 ns/op / +2.1% (worse)
Windows MSVC BenchmarkLookupPCRandom 9.653 ns/op +0.052 ns/op / +0.5% (worse)
Windows MSVC BenchmarkMergeCompilerFlags 374.400 ns/op +1 ns/op / +0.3% (worse)
Windows MSVC BenchmarkMergeLinkerFlags 341.400 ns/op +9.9 ns/op / +3.0% (worse)
Windows MSVC BenchmarkChannelBuffered 30.480 ns/op +0.05 ns/op / +0.2% (worse)
Windows MSVC BenchmarkChannelHandoff 1049 ns/op +51.6 ns/op / +5.2% (worse)
Windows MSVC BenchmarkDefer 45.190 ns/op +0.88 ns/op / +2.0% (worse)
Windows MSVC BenchmarkDirectCall 1.628 ns/op -0.002 ns/op / -0.1% (better)
Windows MSVC BenchmarkGlobalRead 1.358 ns/op +0.001 ns/op / +0.1% (worse)
Windows MSVC BenchmarkGlobalWrite 2.165 ns/op 0 ns/op / +0.0%
Windows MSVC BenchmarkGoroutine 52303 ns/op +112 ns/op / +0.2% (worse)
Windows MSVC BenchmarkInterfaceCall 7.872 ns/op -0.001 ns/op / -0.0127% (better)
Windows MSVC BenchmarkRuntimeGetG 1.631 ns/op +0.001 ns/op / +0.1% (worse)
Windows MSVC 386 BenchmarkLookupPCRandom 26.570 ns/op -0.04 ns/op / -0.2% (better)
Windows MSVC 386 BenchmarkMergeCompilerFlags 707.600 ns/op -46.9 ns/op / -6.2% (better)
Windows MSVC 386 BenchmarkMergeLinkerFlags 692.600 ns/op +11.9 ns/op / +1.7% (worse)
Windows MSVC 386 BenchmarkChannelBuffered 43 ns/op -0.05 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkChannelHandoff 961.500 ns/op +58.4 ns/op / +6.5% (worse)
Windows MSVC 386 BenchmarkDefer 48.140 ns/op -1.37 ns/op / -2.8% (better)
Windows MSVC 386 BenchmarkDirectCall 1.548 ns/op 0 ns/op / +0.0%
Windows MSVC 386 BenchmarkGlobalRead 1.860 ns/op -0.001 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkGlobalWrite 7.802 ns/op -0.006 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkGoroutine 87807 ns/op -566 ns/op / -0.6% (better)
Windows MSVC 386 BenchmarkInterfaceCall 9.931 ns/op +0.001 ns/op / +0.01007% (worse)
Windows MSVC 386 BenchmarkRuntimeGetG 2.167 ns/op -0.008 ns/op / -0.4% (better)
Windows MSVC ARM64 BenchmarkLookupPCRandom 12.060 ns/op -0.03 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkMergeCompilerFlags 568.900 ns/op -5.1 ns/op / -0.9% (better)
Windows MSVC ARM64 BenchmarkMergeLinkerFlags 536.100 ns/op +4.4 ns/op / +0.8% (worse)
Windows MSVC ARM64 BenchmarkChannelBuffered 43.290 ns/op -0.07 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkChannelHandoff 1936 ns/op +104 ns/op / +5.7% (worse)
Windows MSVC ARM64 BenchmarkDefer 63.350 ns/op +1.66 ns/op / +2.7% (worse)
Windows MSVC ARM64 BenchmarkDirectCall 0.663 ns/op -0.0002 ns/op / -0.03015% (better)
Windows MSVC ARM64 BenchmarkGlobalRead 0.737 ns/op -0.0004 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkGlobalWrite 3.796 ns/op +0.001 ns/op / +0.02635% (worse)
Windows MSVC ARM64 BenchmarkGoroutine 53556 ns/op +2006 ns/op / +3.9% (worse)
Windows MSVC ARM64 BenchmarkInterfaceCall 4.722 ns/op 0 ns/op / +0.0%
Windows MSVC ARM64 BenchmarkRuntimeGetG 1.770 ns/op -0.047 ns/op / -2.6% (better)

Timer runtime benchmarks

Platform Operation and runtime ns/op vs base
Linux AfterFuncZeroDelivery/Go 600.500 ns/op -3.7 ns/op / -0.6% (better)
Linux AfterFuncZeroDelivery/LLGo 55224 ns/op -490 ns/op / -0.9% (better)
Linux CreateStop/Go 146.500 ns/op -1.5 ns/op / -1.0% (better)
Linux CreateStop/LLGo 872.200 ns/op +44.3 ns/op / +5.4% (worse)
Linux RearmStopped/Go 55.350 ns/op +0.34 ns/op / +0.6% (worse)
Linux RearmStopped/LLGo 899.700 ns/op +159.5 ns/op / +21.5% (worse)
Linux ResetActive/Go 41.810 ns/op +0.31 ns/op / +0.7% (worse)
Linux ResetActive/LLGo 291.200 ns/op -56 ns/op / -16.1% (better)
Linux ResetHeap1024/Go 41.370 ns/op +0.09 ns/op / +0.2% (worse)
Linux ResetHeap1024/LLGo 147 ns/op 0 ns/op / +0.0%
macOS AfterFuncZeroDelivery/Go 421.800 ns/op +31.2 ns/op / +8.0% (worse)
macOS AfterFuncZeroDelivery/LLGo 57248 ns/op +895 ns/op / +1.6% (worse)
macOS CreateStop/Go 127.500 ns/op +6.7 ns/op / +5.5% (worse)
macOS CreateStop/LLGo 406.700 ns/op -4.2 ns/op / -1.0% (better)
macOS RearmStopped/Go 57.590 ns/op +5.18 ns/op / +9.9% (worse)
macOS RearmStopped/LLGo 325.500 ns/op +3 ns/op / +0.9% (worse)
macOS ResetActive/Go 41.670 ns/op +0.91 ns/op / +2.2% (worse)
macOS ResetActive/LLGo 152.300 ns/op +2.4 ns/op / +1.6% (worse)
macOS ResetHeap1024/Go 41.970 ns/op +3.69 ns/op / +9.6% (worse)
macOS ResetHeap1024/LLGo 90.160 ns/op +1.91 ns/op / +2.2% (worse)
Windows MinGW AfterFuncZeroDelivery/Go 491.700 ns/op +13.3 ns/op / +2.8% (worse)
Windows MinGW AfterFuncZeroDelivery/LLGo 124287 ns/op -2773 ns/op / -2.2% (better)
Windows MinGW CreateStop/Go 116.800 ns/op +0.7 ns/op / +0.6% (worse)
Windows MinGW CreateStop/LLGo 486.400 ns/op -16.6 ns/op / -3.3% (better)
Windows MinGW RearmStopped/Go 31.490 ns/op -0.03 ns/op / -0.1% (better)
Windows MinGW RearmStopped/LLGo 331 ns/op +14.3 ns/op / +4.5% (worse)
Windows MinGW ResetActive/Go 19.040 ns/op -0.06 ns/op / -0.3% (better)
Windows MinGW ResetActive/LLGo 156.800 ns/op -16.1 ns/op / -9.3% (better)
Windows MinGW ResetHeap1024/Go 19.260 ns/op +0.09 ns/op / +0.5% (worse)
Windows MinGW ResetHeap1024/LLGo 157.600 ns/op +3.8 ns/op / +2.5% (worse)
Windows MinGW 386 AfterFuncZeroDelivery/Go 767.400 ns/op -9.4 ns/op / -1.2% (better)
Windows MinGW 386 AfterFuncZeroDelivery/LLGo 124688 ns/op +911 ns/op / +0.7% (worse)
Windows MinGW 386 CreateStop/Go 168.500 ns/op +1.4 ns/op / +0.8% (worse)
Windows MinGW 386 CreateStop/LLGo 1830 ns/op +41 ns/op / +2.3% (worse)
Windows MinGW 386 RearmStopped/Go 56.640 ns/op -0.08 ns/op / -0.1% (better)
Windows MinGW 386 RearmStopped/LLGo 284.800 ns/op -7.4 ns/op / -2.5% (better)
Windows MinGW 386 ResetActive/Go 32.520 ns/op -0.44 ns/op / -1.3% (better)
Windows MinGW 386 ResetActive/LLGo 934.300 ns/op +36.7 ns/op / +4.1% (worse)
Windows MinGW 386 ResetHeap1024/Go 32.720 ns/op -0.13 ns/op / -0.4% (better)
Windows MinGW 386 ResetHeap1024/LLGo 155.800 ns/op -0.3 ns/op / -0.2% (better)
Windows MinGW ARM64 AfterFuncZeroDelivery/Go 662 ns/op -11.7 ns/op / -1.7% (better)
Windows MinGW ARM64 AfterFuncZeroDelivery/LLGo 145341 ns/op +8652 ns/op / +6.3% (worse)
Windows MinGW ARM64 CreateStop/Go 195.700 ns/op -14.6 ns/op / -6.9% (better)
Windows MinGW ARM64 CreateStop/LLGo 435.200 ns/op +4.1 ns/op / +1.0% (worse)
Windows MinGW ARM64 RearmStopped/Go 70.630 ns/op -2.28 ns/op / -3.1% (better)
Windows MinGW ARM64 RearmStopped/LLGo 297.900 ns/op +1.1 ns/op / +0.4% (worse)
Windows MinGW ARM64 ResetActive/Go 31.080 ns/op -0.52 ns/op / -1.6% (better)
Windows MinGW ARM64 ResetActive/LLGo 127.800 ns/op +0.6 ns/op / +0.5% (worse)
Windows MinGW ARM64 ResetHeap1024/Go 31.160 ns/op -1.39 ns/op / -4.3% (better)
Windows MinGW ARM64 ResetHeap1024/LLGo 143.600 ns/op +0.9 ns/op / +0.6% (worse)
Windows MSVC AfterFuncZeroDelivery/Go 374 ns/op +4.9 ns/op / +1.3% (worse)
Windows MSVC AfterFuncZeroDelivery/LLGo 99780 ns/op -4524 ns/op / -4.3% (better)
Windows MSVC CreateStop/Go 90.340 ns/op -0.05 ns/op / -0.1% (better)
Windows MSVC CreateStop/LLGo 370.500 ns/op -4 ns/op / -1.1% (better)
Windows MSVC RearmStopped/Go 24.450 ns/op 0 ns/op / +0.0%
Windows MSVC RearmStopped/LLGo 246.700 ns/op -0.2 ns/op / -0.1% (better)
Windows MSVC ResetActive/Go 14.800 ns/op 0 ns/op / +0.0%
Windows MSVC ResetActive/LLGo 113.400 ns/op 0 ns/op / +0.0%
Windows MSVC ResetHeap1024/Go 14.860 ns/op -0.08 ns/op / -0.5% (better)
Windows MSVC ResetHeap1024/LLGo 118.200 ns/op +0.7 ns/op / +0.6% (worse)
Windows MSVC 386 AfterFuncZeroDelivery/Go 956 ns/op +6.3 ns/op / +0.7% (worse)
Windows MSVC 386 AfterFuncZeroDelivery/LLGo 182619 ns/op -891 ns/op / -0.5% (better)
Windows MSVC 386 CreateStop/Go 192.400 ns/op -0.4 ns/op / -0.2% (better)
Windows MSVC 386 CreateStop/LLGo 1703 ns/op -4 ns/op / -0.2% (better)
Windows MSVC 386 RearmStopped/Go 64.770 ns/op -0.21 ns/op / -0.3% (better)
Windows MSVC 386 RearmStopped/LLGo 343.500 ns/op +2 ns/op / +0.6% (worse)
Windows MSVC 386 ResetActive/Go 39.310 ns/op -0.5 ns/op / -1.3% (better)
Windows MSVC 386 ResetActive/LLGo 342 ns/op -531.2 ns/op / -60.8% (better)
Windows MSVC 386 ResetHeap1024/Go 39.510 ns/op -0.6 ns/op / -1.5% (better)
Windows MSVC 386 ResetHeap1024/LLGo 185 ns/op +7.6 ns/op / +4.3% (worse)
Windows MSVC ARM64 AfterFuncZeroDelivery/Go 682.100 ns/op +10.8 ns/op / +1.6% (worse)
Windows MSVC ARM64 AfterFuncZeroDelivery/LLGo 129695 ns/op +10055 ns/op / +8.4% (worse)
Windows MSVC ARM64 CreateStop/Go 197.300 ns/op -2.2 ns/op / -1.1% (better)
Windows MSVC ARM64 CreateStop/LLGo 485.200 ns/op +8 ns/op / +1.7% (worse)
Windows MSVC ARM64 RearmStopped/Go 70.540 ns/op -0.24 ns/op / -0.3% (better)
Windows MSVC ARM64 RearmStopped/LLGo 313.200 ns/op -0.2 ns/op / -0.1% (better)
Windows MSVC ARM64 ResetActive/Go 31.070 ns/op +0.01 ns/op / +0.0322% (worse)
Windows MSVC ARM64 ResetActive/LLGo 143.200 ns/op +1.7 ns/op / +1.2% (worse)
Windows MSVC ARM64 ResetHeap1024/Go 31.060 ns/op -0.03 ns/op / -0.1% (better)
Windows MSVC ARM64 ResetHeap1024/LLGo 147.600 ns/op +0.9 ns/op / +0.6% (worse)

Compared with 0b99651e205a measured in the same runner job.

@xushiwei
xushiwei merged commit b200f0f into xgo-dev:main Aug 31, 2026
92 of 94 checks passed
@cpunion cpunion mentioned this pull request Aug 31, 2026
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants