type traceTypeTable … // put returns a unique id for the type typ and caches it in the table, // if it's seeing it for the first time. // // N.B. typ must be kept alive forever for this to work correctly. func (t *traceTypeTable) put(typ *abi.Type) uint64 { … } // dump writes all previously cached types to trace buffers and // releases all memory and resets state. It must only be called once the caller // can guarantee that there are no more writers to the table. func (t *traceTypeTable) dump(gen uintptr) { … } func dumpTypesRec(node *traceMapNode, w traceWriter) traceWriter { … }