Go: A Documentary

Go 1.5

Part II · commits first contained in tag go1.5 ^go1.4 (tagged 2015-08-19) · 1617 in-scope commits

The toolchain is Go: compilers, linker and assemblers translated (cmd/compile, cmd/link, cmd/asm, cmd/internal/obj), C compilers deleted. Concurrent GC with pacer, assists and stack barriers. GOMAXPROCS defaults to NumCPU. Execution tracer. Build modes c-archive, c-shared and shared. ppc64 and arm64 ports. Frame-pointer 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)

The concurrent collector: allocator and GC translated to Go, dev.garbage barriers, pacer with assists and utilisation scheduling, 2-bit heap bitmap, stack barriers; the largest release for the GC arc.

Other changes

Scheduler and concurrency

From Scheduler and concurrency runtime (Go 1.0–1.17)

The concurrent collector's scheduling machinery (ragged barrier, background workers, forEachP), GOMAXPROCS = NumCPU, runnext, mutex spinning, bounded caches, execution tracer; threads: scheduler core, STW/GC, Mutex, diagnostics.

Other changes

Data structures and type metadata

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

Pointer-free maps unscanned, overflow pointer at bucket end, new fallback hash, 1-bit pointer bitmaps in type data, FuncOf/ArrayOf, duff routine generation and assembly cmpstring.

Other changes

Diagnostics and knobs

From Diagnostics and knobs (Go 1.0–1.17)

Execution tracer, go tool trace and runtime/trace introduced; sequence-numbered ordering; GODEBUG gccheckmark and memprofilerate.

Other changes

OS layer, stacks and panics

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

The all-Go runtime ([dev.cc] conversion), the power64/ppc64, arm64, darwin/arm(64), Android, openbsd/arm ports, GC stack barriers, the first signal-mask policy and forwarding, shared-library entry points and the first cgo pointer plumbing.

Other changes

Compiler frontend

From Compiler frontend (Go 1.1–1.9)

Compiler translated from C to Go (cmd/internal/gc → cmd/compile), math/big-based constants, Node slimming, capture-by-value closures and closure-call transformation, stack allocation of strings/maps/interfaces, transitive inlining, flow of params to results in escape analysis.

Other changes

Middle end and SSA optimizer

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

The compiler converted to Go; write barriers emitted by gc; concrete==interface, _, ok := i.(T), re-slice and &T{} escape improvements (threads: write barriers, escape analysis, interface conversions, switch lowering).

Other changes

Backends and assemblers

From Backends and assemblers (Go 1.0–1.6)

The toolchain becomes Go: liblink to cmd/internal/obj, cmd/asm, all compilers and linkers translated, C compilers deleted, go tool compile/link; ppc64 and arm64 ports; shared-library codegen; frame pointers; portable cgen. Threads: C→Go, assemblers, obj normalisation, ppc64, arm64, PIC/TLS.

Other changes

Linker and object files

From Linker and object files (Go 1.0–1.9)

The linker is converted from C to Go via c2go and moved to cmd/link; -buildmode c-archive/c-shared/shared/-linkshared appear; power64, arm64 and darwin/arm ports; external linking on Windows and arm64; findfunc lookup table.

Other changes