~/talk

Implementing Code Coverage with -toolexec

Talkat GopherCon 2024 · 2024-07-07..07-10· [compilers-and-language-design]
links:none on file
slides:none on file

Explains how Go’s coverage works by recreating it with -toolexec, showing the actual instrumentation format (legacy text), the runtime limitation that forces a deferred dump in main instead of the internal coverage hook, and how the build graph and linker importcfg (about 47 packages in the example) drive ordering. Implements per-compile instrumentation, a cache keyed from object IDs, generates a helper package and rebuilds main with export and patched importcfg; admits the result is kludgy and “mostly works.”

AI-written summary · about

  1. 0:00Understanding code coverage
  2. 2:03Analyzing the action graph
  3. 3:57Implementing custom coverage
  4. 5:59Challenges and solutions
~/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.