Go: A Documentary

Go 1.16

Part II · commits first contained in tag go1.16 ^go1.15 (tagged 2021-02-16) · 862 in-scope commits

runtime/metrics. Late call expansion. pclntab restructured and sym.Symbol deleted. //go:embed. 387 removed in favour of softfloat. GOOS=ios. MADV_DONTNEED by default again. Early devirtualization. Frame pointers no longer an experiment.

Each area lists the stage every thread reached in this release (with what was left open afterwards), then changes that are not part of a thread. Thread names link to the full thread on its topic page.

Memory management

From Memory management: GC and allocator (Go 1.0–1.17)

Consistent sharded heap statistics, 24-byte size class, checkmarks bitmap, bit-parallel summaries.

Other changes

Scheduler and concurrency

From Scheduler and concurrency runtime (Go 1.0–1.17)

Timer latency fixes, no stealing from idle Ps, timerpMask, lock-rank assertions, mark-worker pool; threads: timers, scheduler, lock ranking.

Other changes

Data structures and type metadata

From Runtime data structures and type metadata (Go 1.0–1.17)

Map seed rotation on clear, itab and GC-map content-addressable symbols, append growth keyed by capacity, Zero buffer, exported/non-exported interface method split, notinheap pointers indirect.

Other changes

Diagnostics and knobs

From Diagnostics and knobs (Go 1.0–1.17)

runtime/metrics introduced with histograms; consistent memstats; default to MADV_DONTNEED; race on darwin/arm64; msan memmove.

Other changes

OS layer, stacks and panics

From OS interface, stacks and panics (Go 1.5–1.17)

C→Go call path simplified, GOOS=ios, openbsd/amd64 and arm64 on libc, syscall.AllThreadsSyscall, high-resolution Windows sleep, mlock workaround reverted, M-reentrant nanotime1.

Other changes

Compiler frontend

From Compiler frontend (Go 1.10–1.17)

//go:embed, go:notinheap hardening, type-switch and method-value inlining, early devirtualization, export-data hash as fingerprint, init-cycle reporting fix.

Other changes

Middle end and SSA optimizer

From Middle end and SSA optimizer (Go 1.10–1.17)

Late call expansion turned on for all call kinds (expand_calls), early devirtualization via staticValue, inlining of for loops and go/defer arguments, escape analysis of known calls, and removal of untyped rules (threads: Late call expansion, Early devirtualization, Inlining, Escape).

Other changes

Backends and assemblers

From Backends and assemblers (Go 1.12–1.17)

typed aux finished everywhere; late call expansion (AuxCall); 387 removed, softfloat added; arm64 SHA/atomics/SIMD; riscv64 g moved to X27 with PIE; content-addressable symbols; register maps deleted.

Other changes

Linker and object files

From Linker and object files (Go 1.10–1.17)

sym.Symbol deleted; pclntab split into pcheader/funcnametab/pctab with generator symbols and hashed symbols; streaming external relocations; UsedInIface/R_USEIFACE/R_USEIFACEMETHOD method pruning; darwin/arm64 internal linking and code signing.

Other changes