MCPcopy
hub / github.com/gogf/gf / Stack

Function Stack

debug/gdebug/gdebug_stack.go:22–24  ·  view source on GitHub ↗

Stack returns a formatted stack trace of the goroutine that calls it. It calls runtime.Stack with a large enough buffer to capture the entire trace.

(skip ...int)

Source from the content-addressed store, hash-verified

20// Stack returns a formatted stack trace of the goroutine that calls it.
21// It calls runtime.Stack with a large enough buffer to capture the entire trace.
22func Stack(skip ...int) string {
23 return StackWithFilter(nil, skip...)
24}
25
26// StackWithFilter returns a formatted stack trace of the goroutine that calls it.
27// It calls runtime.Stack with a large enough buffer to capture the entire trace.

Callers 3

Test_StackFunction · 0.92
Benchmark_StackFunction · 0.70
PrintStackFunction · 0.70

Calls 1

StackWithFilterFunction · 0.70

Tested by 2

Test_StackFunction · 0.74
Benchmark_StackFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…