Tracing goroutines in realtime with eBPF (sazak.io)
The article introduces xgotop, a Go runtime tracing tool built on eBPF to observe goroutine state transitions and related memory events in near realtime. It explains the goroutine lifecycle in Go (including key runtime states) and shows how tracing runtime functions like casgstatus, newobject, makeslice, and map creation can reveal goroutine IDs, parent relationships, state changes, and allocation sizes. The author also uses bpftrace to validate proof-of-concept hooks before outlining the approach for a full eBPF implementation.
April 02, 2026 01:41
Source: Hacker News