Go: A Documentary

Go 1.8

Part II · commits first contained in tag go1.8 ^go1.7 (tagged 2017-02-16) · 1012 in-scope commits

SSA is the only backend on every architecture, and the legacy backend is deleted. Hybrid write barrier, so no more STW stack rescans. New syntax package and noder. Plugins. Cheaper defers and cgo calls. pprof protobuf output. Mutex profile. Same-size map growth.

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)

Hybrid write barrier ends STW stack rescans; bigger static size classes; sweep and root marking proportional to in-use spans; NextGC redefined.

Other changes

Scheduler and concurrency

From Scheduler and concurrency runtime (Go 1.0–1.17)

Mutex profile, atomic intrinsics, select/stack-growth race fix; threads: diagnostics, channels, atomics.

Other changes

Data structures and type metadata

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

Same-size map growth to bound overflow buckets, duplicate-itab handling across shared libraries, typemap/typelinks work, reflect.Swapper, decoderune.

Other changes

Diagnostics and knobs

From Diagnostics and knobs (Go 1.0–1.17)

pprof protobuf output for CPU, heap, goroutine and counted profiles; GC events in traces; MemStats documented and NextGC made the real heap goal.

Other changes

OS layer, stacks and panics

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

cheaper defer (-42%) and defer-free cgo calls, mips/mipsle, plugin runtime support, unified Unix signal code, libc sigaction under cgo, physical page size query, SIGPIPE in libraries.

Other changes

Compiler frontend

From Compiler frontend (Go 1.1–1.9)

New syntax package and noder replace the gc lexer/parser, textual export format removed, printer vs fmt.Formatter formatting rewrite, go:notinheap/yeswritebarrierrec, mapassign returns a slot pointer, first (reverted) alias implementation.

Other changes

Middle end and SSA optimizer

From Middle end and SSA optimizer (Go 1.0–1.9)

SSA becomes default on ARM, arm64, mips, mips64, s390x, ppc64; nil checks redone; writebarrier pass in SSA; Sreedhar-Gao phis; O(n log n) CSE; type-assert/switch inlining; preemptible-loop experiment (threads: SSA arrival, nilcheck, write barriers, CSE, phis, interface conversions, switch lowering).

Other changes

Backends and assemblers

From Backends and assemblers (Go 1.7–1.11)

SSA becomes the only backend for every architecture: ARM, 386, ARM64, PPC64/le, MIPS64, s390x and the new MIPS32 port, with the legacy cgen/gins code deleted (167e381f40, e7cc9c4f4d); new passes (writebarrier, nil-check redo, stack layout in SSA), atomic intrinsics, link register allocation, and PPC64/s390x assembler growth.

Other changes

Linker and object files

From Linker and object files (Go 1.0–1.9)

Plugins and plugin versioning, rel.ro segment and internal PIE groundwork, DWARF for functions generated in the compiler, ARM/ppc64x trampolines, mips, global state removed from cmd/link.

Other changes