package trace

Import Path
	internal/trace (on go.dev)

Dependency Relation
	imports 17 packages, and imported by 3 packages


Package-Level Type Names (total 38)
/* sort by: | */
Event represents a single event in the trace. Experimental returns a view of the raw event for an experimental event. Panics if Kind != EventExperimental. Goroutine returns the ID of the goroutine that was executing when this event happened. It describes part of the execution context for this event. Note that for goroutine state transitions this always refers to the state before the transition. For example, if a goroutine is just starting to run on this thread and/or proc, then this will return NoGoroutine. In this case, the goroutine starting to run will be can be found at Event.StateTransition().Resource. Kind returns the kind of event that this is. Label returns details about a Label event. Panics if Kind != EventLabel. Log returns details about a Log event. Panics if Kind != EventLog. Metric returns details about a Metric event. Panics if Kind != EventMetric. Proc returns the ID of the proc this event event pertains to. Note that for proc state transitions this always refers to the state before the transition. For example, if a proc is just starting to run on this thread, then this will return NoProc. Range returns details about an EventRangeBegin, EventRangeActive, or EventRangeEnd event. Panics if Kind != EventRangeBegin, Kind != EventRangeActive, and Kind != EventRangeEnd. RangeAttributes returns attributes for a completed range. Panics if Kind != EventRangeEnd. Region returns details about a RegionBegin or RegionEnd event. Panics if Kind != EventRegionBegin and Kind != EventRegionEnd. Stack returns a handle to a stack associated with the event. This represents a stack trace at the current moment in time for the current execution context. StateTransition returns details about a StateTransition event. Panics if Kind != EventStateTransition. String returns the event as a human-readable string. The format of the string is intended for debugging and is subject to change. Task returns details about a TaskBegin or TaskEnd event. Panics if Kind != EventTaskBegin and Kind != EventTaskEnd. Thread returns the ID of the thread this event pertains to. Note that for thread state transitions this always refers to the state before the transition. For example, if a thread is just starting to run, then this will return NoThread. Note: tracking thread state is not currently supported, so this will always return a valid thread ID. However thread state transitions may be tracked in the future, and callers must be robust to this possibility. Time returns the timestamp of the event. Event : expvar.Var Event : fmt.Stringer func (*Reader).ReadEvent() (e Event, err error) func MutatorUtilizationV2(events []Event, flags UtilFlags) [][]MutatorUtil func RelatedGoroutinesV2(events []Event, goid GoID) map[GoID]struct{} func (*Summarizer).Event(ev *Event) func internal/trace/testtrace.(*Validator).Event(ev Event) error
EventKind indicates the kind of event this is. Use this information to obtain a more specific event that allows access to more detailed information. String returns a string form of the EventKind. EventKind : expvar.Var EventKind : fmt.Stringer func Event.Kind() EventKind const EventBad const EventExperimental const EventLabel const EventLog const EventMetric const EventRangeActive const EventRangeBegin const EventRangeEnd const EventRegionBegin const EventRegionEnd const EventStackSample const EventStateTransition const EventSync const EventTaskBegin const EventTaskEnd
ExperimentalBatch represents a packet of unparsed data along with metadata about that packet. Data is a packet of unparsed data all produced by one thread. Thread is the ID of the thread that produced a packet of data.
ExperimentalData represents some raw and unparsed sidecar data present in the trace that is associated with certain kinds of experimental events. For example, this data may contain tables needed to interpret ExperimentalEvent arguments, or the ExperimentEvent could just be a placeholder for a differently encoded event that's actually present in the experimental data. Batches contain the actual experimental data, along with metadata about each batch.
ExperimentalEvent presents a raw view of an experimental event's arguments and thier names. ArgNames is the names of the event's arguments in order. This may refer to a globally shared slice. Copy before mutating. Args contains the event's arguments. Data is additional unparsed data that is associated with the experimental event. Data is likely to be shared across many ExperimentalEvents, so callers that parse Data are encouraged to cache the parse result and look it up by the value of Data. Name is the name of the event. func Event.Experimental() ExperimentalEvent
Frame is a frame in stack traces. File string Fn string Line int PC uint64 func internal/trace/traceviewer.(*Emitter).Stack(stk []*Frame) int
GoID is the runtime-internal G structure's goid field. This is unique for each goroutine. func RelatedGoroutinesV2(events []Event, goid GoID) map[GoID]struct{} func Event.Goroutine() GoID func ResourceID.Goroutine() GoID func RelatedGoroutinesV2(events []Event, goid GoID) map[GoID]struct{} const NoGoroutine
GoroutineExecStats contains statistics about a goroutine's execution during a period of time. BlockTimeByReason map[string]time.Duration These stats are all non-overlapping. Total time the goroutine spent in certain ranges; may overlap with other stats. SchedWaitTime time.Duration SyscallBlockTime time.Duration SyscallTime time.Duration TotalTime is the duration of the goroutine's presence in the trace. Necessarily overlaps with other stats. ( GoroutineExecStats) NonOverlappingStats() map[string]time.Duration UnknownTime returns whatever isn't accounted for in TotalTime.
GoroutineSummary contains statistics and execution details of a single goroutine. (For v2 traces.) // Timestamp of the first appearance in the trace. // Timestamp of when the goroutine exited. 0 if the goroutine never exited. Statistics of execution time during the goroutine execution. GoroutineExecStats.BlockTimeByReason map[string]time.Duration These stats are all non-overlapping. Total time the goroutine spent in certain ranges; may overlap with other stats. GoroutineExecStats.SchedWaitTime time.Duration GoroutineExecStats.SyscallBlockTime time.Duration GoroutineExecStats.SyscallTime time.Duration TotalTime is the duration of the goroutine's presence in the trace. Necessarily overlaps with other stats. ID GoID // A non-unique human-friendly identifier for the goroutine. // The first PC we saw for the entry function of the goroutine List of regions in the goroutine, sorted based on the start time. // Timestamp of the first time it started running. 0 if the goroutine never ran. ( GoroutineSummary) NonOverlappingStats() map[string]time.Duration UnknownTime returns whatever isn't accounted for in TotalTime.
GoState represents the state of a goroutine. New GoStates may be added in the future. Users of this type must be robust to that possibility. Executing returns true if the state indicates that the goroutine is executing and bound to its thread. String returns a human-readable representation of a GoState. The format of the returned string is for debugging purposes and is subject to change. GoState : expvar.Var GoState : fmt.Stringer func StateTransition.Goroutine() (from, to GoState) const GoNotExist const GoRunnable const GoRunning const GoSyscall const GoUndetermined const GoWaiting
Label provides details about a Label event. Label is the label applied to some resource. Resource is the resource to which this label should be applied. func Event.Label() Label
Log provides details about a Log event. Category is the category that was passed to runtime/trace.Log or runtime/trace.Logf. Message is the message that was passed to runtime/trace.Log or runtime/trace.Logf. Task is the ID of the task this region is associated with. func Event.Log() Log
Metric provides details about a Metric event. Name is the name of the sampled metric. Names follow the same convention as metric names in the runtime/metrics package, meaning they include the unit. Names that match with the runtime/metrics package represent the same quantity. Note that this corresponds to the runtime/metrics package for the Go version this trace was collected for. Value is the sampled value of the metric. The Value's Kind is tied to the name of the metric, and so is guaranteed to be the same for metric samples for the same metric. func Event.Metric() Metric
An MMUCurve is the minimum mutator utilization curve across multiple window sizes. Examples returns n specific examples of the lowest mutator utilization for the given window size. The returned windows will be disjoint (otherwise there would be a huge number of mostly-overlapping windows at the single lowest point). There are no guarantees on which set of disjoint windows this returns. MMU returns the minimum mutator utilization for the given time window. This is the minimum utilization for all windows of this duration across the execution. The returned value is in the range [0, 1]. MUD returns mutator utilization distribution quantiles for the given window size. The mutator utilization distribution is the distribution of mean mutator utilization across all windows of the given window size in the trace. The minimum mutator utilization is the minimum (0th percentile) of this distribution. (However, if only the minimum is desired, it's more efficient to use the MMU method.) func NewMMUCurve(utils [][]MutatorUtil) *MMUCurve
MutatorUtil is a change in mutator utilization at a particular time. Mutator utilization functions are represented as a time-ordered []MutatorUtil. Time int64 Util is the mean mutator utilization starting at Time. This is in the range [0, 1]. func MutatorUtilizationV2(events []Event, flags UtilFlags) [][]MutatorUtil func NewMMUCurve(utils [][]MutatorUtil) *MMUCurve
ProcID is the runtime-internal G structure's id field. This is unique for each P. func Event.Proc() ProcID func ResourceID.Proc() ProcID const NoProc
ProcState represents the state of a proc. New ProcStates may be added in the future. Users of this type must be robust to that possibility. Executing returns true if the state indicates that the proc is executing and bound to its thread. String returns a human-readable representation of a ProcState. The format of the returned string is for debugging purposes and is subject to change. ProcState : expvar.Var ProcState : fmt.Stringer func StateTransition.Proc() (from, to ProcState) const ProcIdle const ProcNotExist const ProcRunning const ProcUndetermined
Range provides details about a Range event. Name is a human-readable name for the range. This name can be used to identify the end of the range for the resource its scoped to, because only one of each type of range may be active on a particular resource. The relevant resource should be obtained from the Event that produced these details. The corresponding RangeEnd will have an identical name. Scope is the resource that the range is scoped to. For example, a ResourceGoroutine scope means that the same goroutine must have a start and end for the range, and that goroutine can only have one range of a particular name active at any given time. The ID that this range is scoped to may be obtained via Event.Goroutine. The ResourceNone scope means that the range is globally scoped. As a result, any goroutine/proc/thread may start or end the range, and only one such named range may be active globally at any given time. For RangeBegin and RangeEnd events, this will always reference some resource ID in the current execution context. For RangeActive events, this may reference a resource not in the current context. Prefer Scope over the current execution context. func Event.Range() Range
RangeAttributes provides attributes about a completed Range. Name is the name of the sampled metric. Names follow the same convention as metric names in the runtime/metrics package, meaning they include the unit. Names that match with the runtime/metrics package represent the same quantity. Note that this corresponds to the runtime/metrics package for the Go version this trace was collected for. Value is the sampled value of the metric. The Value's Kind is tied to the name of the metric, and so is guaranteed to be the same for metric samples for the same metric. func Event.RangeAttributes() []RangeAttribute
Reader reads a byte stream, validates it, and produces trace events. ReadEvent reads a single event from the stream. If the stream has been exhausted, it returns an invalid event and io.EOF. func NewReader(r io.Reader) (*Reader, error)
Region provides details about a Region event. Task is the ID of the task this region is associated with. Type is the regionType that was passed to runtime/trace.StartRegion or runtime/trace.WithRegion. func Event.Region() Region
ResourceID represents a generic resource ID. Kind is the kind of resource this ID is for. Goroutine obtains a GoID from the resource ID. r.Kind must be ResourceGoroutine or this function will panic. Proc obtains a ProcID from the resource ID. r.Kind must be ResourceProc or this function will panic. String returns a human-readable string representation of the ResourceID. This representation is subject to change and is intended primarily for debugging. Thread obtains a ThreadID from the resource ID. r.Kind must be ResourceThread or this function will panic. ResourceID : expvar.Var ResourceID : fmt.Stringer func MakeResourceID[T](id T) ResourceID
ResourceKind indicates a kind of resource that has a state machine. New ResourceKinds may be added in the future. Users of this type must be robust to that possibility. String returns a human-readable representation of a ResourceKind. The format of the returned string is for debugging purposes and is subject to change. ResourceKind : expvar.Var ResourceKind : fmt.Stringer const ResourceGoroutine const ResourceNone const ResourceProc const ResourceThread
Stack represents a stack. It's really a handle to a stack and it's trivially comparable. If two Stacks are equal then their Frames are guaranteed to be identical. If they are not equal, however, their Frames may still be equal. Frames is an iterator over the frames in a Stack. func Event.Stack() Stack var NoStack
StackFrame represents a single frame of a stack. File is the file which contains the source code of Func. Func is the name of the function this frame maps to. Line is the line number within File which maps to PC. PC is the program counter of the function call if this is not a leaf frame. If it's a leaf frame, it's the point at which the stack trace was taken. func internal/trace/internal/testgen/go122.(*Generation).Stack(stk []StackFrame) uint64
StateTransition provides details about a StateTransition event. Reason is a human-readable reason for the state transition. Resource is the resource this state transition is for. Stack is the stack trace of the resource making the state transition. This is distinct from the result (Event).Stack because it pertains to the transitioning resource, not any of the ones executing the event this StateTransition came from. An example of this difference is the NotExist -> Runnable transition for goroutines, which indicates goroutine creation. In this particular case, a Stack here would refer to the starting stack of the new goroutine, and an (Event).Stack would refer to the stack trace of whoever created the goroutine. Goroutine returns the state transition for a goroutine. Transitions to and from states that are Executing are special in that they change the future execution context. In other words, future events on the same thread will feature the same goroutine until it stops running. Panics if d.Resource.Kind is not ResourceGoroutine. Proc returns the state transition for a proc. Transitions to and from states that are Executing are special in that they change the future execution context. In other words, future events on the same thread will feature the same goroutine until it stops running. Panics if d.Resource.Kind is not ResourceProc. func Event.StateTransition() StateTransition
Summarizer constructs per-goroutine time statistics for v2 traces. Event feeds a single event into the stats summarizer. Finalize indicates to the summarizer that we're done processing the trace. It cleans up any remaining state and returns the full summary. func NewSummarizer() *Summarizer
Summary is the analysis result produced by the summarizer. Goroutines map[GoID]*GoroutineSummary Tasks map[TaskID]*UserTaskSummary func (*Summarizer).Finalize() *Summary
Task provides details about a Task event. ID is a unique identifier for the task. This can be used to associate the beginning of a task with its end. ParentID is the ID of the parent task. Type is the taskType that was passed to runtime/trace.NewTask. May be "" if a task's TaskBegin event isn't present in the trace. func Event.Task() Task
TaskID is the internal ID of a task used to disambiguate tasks (even if they are of the same type). const BackgroundTask const NoTask
ThreadID is the runtime-internal M structure's ID. This is unique for each OS thread. func Event.Thread() ThreadID func ResourceID.Thread() ThreadID func internal/trace/internal/testgen/go122.(*Generation).Batch(thread ThreadID, time testkit.Time) *testkit.Batch const NoThread
Time is a timestamp in nanoseconds. It corresponds to the monotonic clock on the platform that the trace was taken, and so is possible to correlate with timestamps for other traces taken on the same machine using the same clock (i.e. no reboots in between). The actual absolute value of the timestamp is only meaningful in relation to other timestamps from the same clock. BUG: Timestamps coming from traces on Windows platforms are only comparable with timestamps from the same trace. Timestamps across traces cannot be compared, because the system clock is not used as of Go 1.22. BUG: Traces produced by Go versions 1.21 and earlier cannot be compared with timestamps from other traces taken on the same machine. This is because the system clock was not used at all to collect those timestamps. Sub subtracts t0 from t, returning the duration in nanoseconds. func Event.Time() Time func Time.Sub(t0 Time) time.Duration
UserRegionSummary represents a region and goroutine execution stats while the region was active. (For v2 traces.) Region end event. Normally EventRegionEnd event or nil, but can be a state transition event to NotExist if the goroutine terminated without explicitly ending the region. GoroutineExecStats GoroutineExecStats GoroutineExecStats.BlockTimeByReason map[string]time.Duration These stats are all non-overlapping. Total time the goroutine spent in certain ranges; may overlap with other stats. GoroutineExecStats.SchedWaitTime time.Duration GoroutineExecStats.SyscallBlockTime time.Duration GoroutineExecStats.SyscallTime time.Duration TotalTime is the duration of the goroutine's presence in the trace. Necessarily overlaps with other stats. Name string Region start event. Normally EventRegionBegin event or nil, but can be a state transition event from NotExist or Undetermined if the region is a synthetic region representing task inheritance from the parent goroutine. TaskID TaskID ( UserRegionSummary) NonOverlappingStats() map[string]time.Duration UnknownTime returns whatever isn't accounted for in TotalTime.
UserTaskSummary represents a task in the trace. Children []*UserTaskSummary End end event. Normally EventTaskEnd event or nil. Goroutines is the set of goroutines associated with this task. ID TaskID Logs is a list of EventLog events associated with the task. Name string // nil if the parent is unknown. List of regions in the task, sorted based on the start time. Task begin event. An EventTaskBegin event or nil. Complete returns true if we have complete information about the task from the trace: both a start and an end. Descendents returns a slice consisting of itself (always the first task returned), and the transitive closure of all of its children. func (*UserTaskSummary).Descendents() []*UserTaskSummary
UtilFlags controls the behavior of MutatorUtilization. func MutatorUtilizationV2(events []Event, flags UtilFlags) [][]MutatorUtil const UtilAssist const UtilBackground const UtilPerProc const UtilSTW const UtilSweep
UtilWindow is a specific window at Time. MutatorUtil is the mean mutator utilization in this window. Time int64 func (*MMUCurve).Examples(window time.Duration, n int) (worst []UtilWindow)
Value is a dynamically-typed value obtained from a trace. Kind returns the ValueKind of the value. It represents the underlying structure of the value. New ValueKinds may be added in the future. Users of this type must be robust to that possibility. Uint64 returns the uint64 value for a MetricSampleUint64. Panics if this metric sample's Kind is not MetricSampleUint64. Value : math/rand/v2.Source
ValueKind is the type of a dynamically-typed value from a trace. func Value.Kind() ValueKind const ValueBad const ValueUint64
Package-Level Functions (total 7)
Type Parameters: T: interface{GoID | ProcID | ThreadID} MakeResourceID creates a general resource ID from a specific resource's ID.
MutatorUtilizationV2 returns a set of mutator utilization functions for the given v2 trace, passed as an io.Reader. Each function will always end with 0 utilization. The bounds of each function are implicit in the first and last event; outside of these bounds each function is undefined. If the UtilPerProc flag is not given, this always returns a single utilization function. Otherwise, it returns one function per P.
NewMMUCurve returns an MMU curve for the given mutator utilization function.
NewReader creates a new trace reader.
NewSummarizer creates a new struct to build goroutine stats from a trace.
RelatedGoroutinesV2 finds a set of goroutines related to goroutine goid for v2 traces. The association is based on whether they have synchronized with each other in the Go scheduler (one has unblocked another).
Package-Level Variables (only one)
NoStack is a sentinel value that can be compared against any Stack value, indicating a lack of a stack trace.
Package-Level Constants (total 98)
BackgroundTask is the global task that events are attached to if there was no other task in the context at the point the event was emitted.
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.
const EventBad EventKind = 0
EventExperimental is an experimental event that is unvalidated and exposed in a raw form. Users are expected to understand the format and perform their own validation. These events may always be safely ignored.
EventLabel attaches a label to a resource.
EventLog represents a runtime/trace.Log call.
EventMetric is an event that represents the value of a metric at a particular point in time.
EventRangeBegin and EventRangeEnd are a pair of generic events representing a special range of time. Ranges are named and scoped to some resource (identified via ResourceKind). A range that has begun but has not ended is considered active. EvRangeBegin and EvRangeEnd will share the same name, and an End will always follow a Begin on the same instance of the resource. The associated resource ID can be obtained from the Event. ResourceNone indicates the range is globally scoped. That is, any goroutine/proc/thread can start or stop, but only one such range may be active at any given time. EventRangeActive is like EventRangeBegin, but indicates that the range was already active. In this case, the resource referenced may not be in the current context.
EventRegionBegin and EventRegionEnd are a pair of events represent a runtime/trace.Region.
EventStackSample represents an execution sample, indicating what a thread/proc/goroutine was doing at a particular point in time via its backtrace. Note: Samples should be considered a close approximation of what a thread/proc/goroutine was executing at a given point in time. These events may slightly contradict the situation StateTransitions describe, so they should only be treated as a best-effort annotation.
EventStateTransition represents a state change for some resource.
EventKindSync is an event that indicates a global synchronization point in the trace. At the point of a sync event, the trace reader can be certain that all resources (e.g. threads, goroutines) that have existed until that point have been enumerated.
EvTaskBegin and EvTaskEnd are a pair of events representing a runtime/trace.Task.
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 // depicts GC state
const GoNotExist GoState = 1 // Goroutine does not exist.
const GoRunnable GoState = 2 // Goroutine is runnable but not running.
const GoRunning GoState = 3 // Goroutine is running.
const GoSyscall GoState = 5 // Goroutine is in a system call.
const GoUndetermined GoState = 0 // No information is known about the goroutine.
const GoWaiting GoState = 4 // Goroutine is waiting on something to happen.
const NetpollP = 1000002 // depicts network unblocks
NoGoroutine indicates that the relevant events don't correspond to any goroutine in particular.
NoProc indicates that the relevant events don't correspond to any P in particular.
NoTask indicates the lack of a task.
NoThread indicates that the relevant events don't correspond to any thread in particular.
const ProcIdle ProcState = 3 // Proc is idle.
const ProcNotExist ProcState = 1 // Proc does not exist.
const ProcRunning ProcState = 2 // Proc is running.
const ProcUndetermined ProcState = 0 // No information is known about the proc.
const ProfileP = 1000005 // depicts recording of CPU profile samples
const ResourceGoroutine ResourceKind = 1 // Goroutine.
const ResourceNone ResourceKind = 0 // No resource.
const ResourceProc ResourceKind = 2 // Proc.
const ResourceThread ResourceKind = 3 // Thread.
const SyscallP = 1000003 // depicts returns from syscalls
const TimerP = 1000001 // depicts timer unblocks
UtilAssist means utilization should account for mark assists.
UtilBackground means utilization should account for background mark workers.
UtilPerProc means each P should be given a separate utilization function. Otherwise, there is a single function and each P is given a fraction of the utilization.
UtilSTW means utilization should account for STW events. This includes non-GC STW events, which are typically user-requested.
UtilSweep means utilization should account for sweeping.
const ValueBad ValueKind = 0