package oldtrace

Import Path
	internal/trace/internal/oldtrace (on go.dev)

Dependency Relation
	imports 11 packages, and imported by one package

Involved Source Files order.go Package oldtrace implements a parser for Go execution traces from versions 1.11–1.21. The package started as a copy of Go 1.19's internal/trace, but has been optimized to be faster while using less memory and fewer allocations. It has been further modified for the specific purpose of converting traces to the new 1.22+ format.
Package-Level Type Names (total 6)
/* sort by: | */
Event describes one event in the trace. // event-type-specific arguments // G on which the event happened // P on which the event happened (can be a real P or one of TimerP, NetpollP, SyscallP) // unique stack ID // timestamp in nanoseconds // one of Ev* (*Event) String() string *Event : expvar.Var *Event : fmt.Stringer func (*Events).Pop() (*Event, bool) func (*Events).Ptr(i int) *Event
(*Events) All() func(yield func(ev *Event) bool) (*Events) Len() int (*Events) Less(i, j int) bool (*Events) Pop() (*Event, bool) (*Events) Ptr(i int) *Event (*Events) Swap(i, j int) *Events : sort.Interface
Frame is a frame in stack traces. string ID of the file name string ID of the function name Line int PC uint64
func (*Trace).STWReason(kindID uint64) STWReason const STWAllGoroutinesStackTrace const STWAllThreadsSyscall const STWCountPagesInUse const STWGCMarkTermination const STWGCSweepTermination const STWGOMAXPROCS const STWGoroutineProfile const STWGoroutineProfileCleanup const STWPageCachePagesLeaked const STWReadMemStats const STWReadMemStatsSlow const STWReadMetricsSlow const STWResetDebugLog const STWStartTrace const STWStopTrace const STWUnknown const STWWriteHeapDump
Timestamp represents a count of nanoseconds since the beginning of the trace. They can only be meaningfully compared with other timestamps from the same trace.
Trace is the result of Parse. Events is the sorted list of Events in the trace. InlineStrings []string PCs map[uint64]Frame Stacks is the stack traces (stored as slices of PCs), keyed by stack IDs from the trace. Strings map[uint64]string Version version.Version (*Trace) STWReason(kindID uint64) STWReason func Parse(r io.Reader, vers version.Version) (Trace, error)
Package-Level Functions (only one)
Parse parses Go execution traces from versions 1.11–1.21. The provided reader will be read to completion and the entire trace will be materialized in memory. That is, this function does not allow incremental parsing. The reader has to be positioned just after the trace header and vers needs to be the version of the trace. This can be achieved by using version.ReadHeader.
Package-Level Variables (total 2)
ErrTimeOrder is returned by Parse when the trace contains time stamps that do not respect actual event ordering.
var EventDescriptions [256]struct{Name string; minVersion version.Version; Stack bool; Args []string; SArgs []string}
Package-Level Constants (total 75)
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Event types in the trace. Verbatim copy from src/runtime/trace.go with the "trace" prefix removed.
Special P identifiers:
const GCP = 1000004 // contains GC state
const NetpollP = 1000002 // contains network unblocks
const NumSTWReasons = 17
const ProfileP = 1000005 // contains recording of CPU profile samples
const SyscallP = 1000003 // contains returns from syscalls
const TimerP = 1000001 // contains timer unblocks