type names … // Fixup adds calls to the pkg init function as appropriate to // register coverage-related variables with the runtime. // // It also reclassifies selected variables (for example, tagging // coverage counter variables with flags so that they can be handled // properly downstream). func Fixup() { … } func metaHashAndLen() ([16]byte, int) { … } func registerMeta(cnames names, hashv [16]byte, mdlen int) { … } // addInitHookCall generates a call to runtime/coverage.initHook() and // inserts it into the package main init function, which will kick off // the process for coverage data writing (emit meta data, and register // an exit hook to emit counter data). func addInitHookCall(initfn *ir.Func, cmode coverage.CounterMode) { … }