MCPcopy
hub / github.com/safing/portmaster / AddGoroutineStack

Method AddGoroutineStack

base/utils/debug/debug.go:93–111  ·  view source on GitHub ↗

AddGoroutineStack adds the current goroutine stack.

()

Source from the content-addressed store, hash-verified

91
92// AddGoroutineStack adds the current goroutine stack.
93func (di *Info) AddGoroutineStack() {
94 buf := new(bytes.Buffer)
95 err := pprof.Lookup("goroutine").WriteTo(buf, 1)
96 if err != nil {
97 di.AddSection(
98 "Goroutine Stack",
99 NoFlags,
100 fmt.Sprintf("Failed to get: %s", err),
101 )
102 return
103 }
104
105 // Add section.
106 di.AddSection(
107 "Goroutine Stack",
108 UseCodeSection,
109 buf.String(),
110 )
111}
112
113// AddLastUnexpectedLogs adds the last 10 unexpected log lines, if any.
114func (di *Info) AddLastUnexpectedLogs() {

Callers 3

debugInfoFunction · 0.80
debugInfoFunction · 0.80
debugInfoFunction · 0.80

Calls 2

AddSectionMethod · 0.95
StringMethod · 0.65

Tested by

no test coverage detected