Go: A Documentary

Go 1.7

Part II · commits first contained in tag go1.7 ^go1.6 (tagged 2016-08-15) · 1594 in-scope commits

SSA backend for amd64: CSE, nil-check elimination, prove/BCE, a global register allocator. Mark-bit-based allocation (allocBits/freeindex). Smaller type descriptors (nameOff/typeOff). Binary export data by default. Linker speed and memory campaign. Frame pointers on by default on amd64.

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)

dev.garbage bitmap allocator (allocBits, freeindex, ctz), allocate-black, O(dirty) stack rescan, concurrent stack shrink, 32-bit full address space.

Other changes

Scheduler and concurrency

From Scheduler and concurrency runtime (Go 1.0–1.17)

Concurrent stack shrinking support for channels, new Cond, better randomized stealing; threads: channels, Cond, scheduler.

Other changes

Data structures and type metadata

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

Descriptor shrinking (nameOff/typeOff, static name encoding, tflag, embedded rtype fields), StructOf, compiler itabs and pointer-shaped convT2I, growslice/makeslice division avoidance.

Other changes

Diagnostics and knobs

From Diagnostics and knobs (Go 1.0–1.17)

Per-goroutine sequence numbers cut tracing overhead (453% → 26% at 48 cores); file:line in traces; per-P TSan contexts.

Other changes

OS layer, stacks and panics

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

concurrent-safe stack shrinking during concurrent mark, s390x port, extra-M batching for cgo callbacks, plan9/arm, symbolic C backtraces, set_thread_area on 386, signal names in panics.

Other changes

Compiler frontend

From Compiler frontend (Go 1.1–1.9)

Binary export data on by default (inlined bodies, positions, -linkobj), NodeList removed in favour of Nodes, Type encapsulation and shrinking, itabs emitted by compiler, [dev.ssa] backend lands with frontend support, lexer rewrite.

Other changes

Middle end and SSA optimizer

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

SSA arrives (dev.ssa merged): IR, rulegen, CSE, nilcheckelim, prove/BCE and induction-variable BCE, regalloc, decompose, phi building, dominators; amd64 default (threads: SSA arrival, rewrite rules, CSE, nilcheck, prove, phi construction, dominators/CFG, write barriers).

Other changes

Backends and assemblers

From Backends and assemblers (Go 1.7–1.11)

The dev.ssa SSA backend for amd64 lands (IR to SSA, generic and AMD64 rules, global register allocator, tighten, flag recomputation, scheduler), together with intrinsics, load combining, and a slew of cmd/internal/obj cleanups (As type, ADATA removal, cmd/internal/sys); s390x object/assembler support arrives and the ARM SSA port is started. Threads: SSA bring-up, register allocation, scheduling, obj refactoring.

Other changes

Linker and object files

From Linker and object files (Go 1.0–1.9)

Linker speed/memory campaign, new object format with reference indexes and contiguous data, string merging and method pruning, typelink offsets, cmd/newlink removed, deterministic builds, s390x.

Other changes