Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PrintConfig ¶
type PrintConfig struct { Format PrintFormat PreserveSourcePrefix bool }
type Stack ¶
type Stack struct { ID int Status StackStatus Calls []Call }
Stack represents the call stack trace of a goroutine.
func ExcludeGoroot ¶
ExcludeGoroot filters out GOROOT function calls form the top of stacks. If `preserveOne` is set, it leaves the nearest GOROOT function call.
func ExcludeGotest ¶
ExcludeGotest filters out no meaningful stacks and calls caused by go test command and testing package.
func ExcludeLowers ¶
ExcludeLowers filters calls of stacks by excluding function calls that is not the top of stack.
func TrimSourcePrefix ¶
TrimSourcePrefix trims file path prefix from src.Calls.Source field.
type StackStatus ¶
type StackStatus string
const ( StackStatusChanReceive StackStatus = "chan receive" StackStatusChanReceiveNil StackStatus = "chan receive (nil chan)" StackStatusChanSend StackStatus = "chan send" StackStatusChanSendNil StackStatus = "chan send (nil chan)" StackStatusSemAcquire StackStatus = "semacquire" StackStatusRunning StackStatus = "running" StackStatusRunnable StackStatus = "runnable" StackStatusSleep StackStatus = "sleep" StackStatusFinalizerWait StackStatus = "finalizer wait" StackStatusSyscall StackStatus = "syscall" StackStatusIOWait StackStatus = "IO Wait" StackStatusWrite StackStatus = "Write" StackStatusRead StackStatus = "Read" StackStatusPreviousWrite StackStatus = "Previous write" StackStatusPreviousRead StackStatus = "Previous read" StackStatusRuntime StackStatus = "runtime stack" )
type Traceback ¶
Traceback represents the per-goroutine stacktraces generated by GOTRACEBACK=1 environment.
func ParseTraceback ¶
ParseTraceback parses the per-goroutine stacktraces generated by GOTRACEBACK=1 environment. It reads `r` and constructs a `Traceback` struct to return. It also writes unrelated lines to `w`.