const traceAllocFreeTypesBatch … const traceAllocFreeInfoBatch … // traceSnapshotMemory takes a snapshot of all runtime memory that there are events for // (heap spans, heap objects, goroutine stacks, etc.) and writes out events for them. // // The world must be stopped and tracing must be enabled when this function is called. func traceSnapshotMemory(gen uintptr) { … } func traceSpanTypeAndClass(s *mspan) traceArg { … } // SpanExists records an event indicating that the span exists. func (tl traceLocker) SpanExists(s *mspan) { … } // SpanAlloc records an event indicating that the span has just been allocated. func (tl traceLocker) SpanAlloc(s *mspan) { … } // SpanFree records an event indicating that the span is about to be freed. func (tl traceLocker) SpanFree(s *mspan) { … } // traceSpanID creates a trace ID for the span s for the trace. func traceSpanID(s *mspan) traceArg { … } // HeapObjectExists records that an object already exists at addr with the provided type. // The type is optional, and the size of the slot occupied the object is inferred from the // span containing it. func (tl traceLocker) HeapObjectExists(addr uintptr, typ *abi.Type) { … } // HeapObjectAlloc records that an object was newly allocated at addr with the provided type. // The type is optional, and the size of the slot occupied the object is inferred from the // span containing it. func (tl traceLocker) HeapObjectAlloc(addr uintptr, typ *abi.Type) { … } // HeapObjectFree records that an object at addr is about to be freed. func (tl traceLocker) HeapObjectFree(addr uintptr) { … } // traceHeapObjectID creates a trace ID for a heap object at address addr. func traceHeapObjectID(addr uintptr) traceArg { … } // GoroutineStackExists records that a goroutine stack already exists at address base with the provided size. func (tl traceLocker) GoroutineStackExists(base, size uintptr) { … } // GoroutineStackAlloc records that a goroutine stack was newly allocated at address base with the provided size.. func (tl traceLocker) GoroutineStackAlloc(base, size uintptr) { … } // GoroutineStackFree records that a goroutine stack at address base is about to be freed. func (tl traceLocker) GoroutineStackFree(base uintptr) { … } // traceGoroutineStackID creates a trace ID for the goroutine stack from its base address. func traceGoroutineStackID(base uintptr) traceArg { … } // traceCompressStackSize assumes size is a power of 2 and returns log2(size). func traceCompressStackSize(size uintptr) traceArg { … }