~/talk

Understanding the Go runtime

Talkat GopherCon UK 2024 · 2024-08-14..08-16· [go]
slides:none on file

Shows the Go runtime shipped into every binary (version 1.22 runtime), with the ELF entry at rt0 entry before main and compiler-inserted calls into runtime for maps, slices and stack growth. Practical tools used: readelf and gdb to inspect entry points, and source links with file/line references. Surprising numbers: empty Go binary ~1.2MB vs C ~16KB and slice growth: 124 ints → 8,192 bytes but 125 ints → 9,472 bytes because of mspan sizes up to 32KB. GC pacing follows GOGC=100.

AI-written summary · about

  1. 0:00Go runtime introduction
  2. 0:41Talk purpose
  3. 3:30Go vs C execution
  4. 5:18Compiler and runtime
  5. 10:16Runtime in binaries
  6. 11:46Go runtime bootstrap
  7. 13:33Go scheduler basics
  8. 15:39Stop the world init
  9. 16:41Memory allocator
  10. 21:45CPU flags and RNG
  11. 23:10Main thread init
  12. 24:35Secure flag setup
  13. 26:21Debugging config
  14. 27:05Garbage collector
  15. 30:23Virtual CPUs start
  16. 31:06Runtime main monitor
  17. 34:57GC auxiliary processes
  18. 35:19What happens while the runtime runs
  19. 37:25Compiler runtime features
  20. 38:08Runtime init recap
  21. 39:32Key takeaways
  22. 41:19Explore Go source
  23. 42:44Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.