MCPcopy Index your code
hub / github.com/rabbitstack/fibratus / String

Method String

pkg/callstack/callstack.go:304–336  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

302}
303
304func (s Callstack) String() string {
305 var b strings.Builder
306
307 for i := range s {
308 frame := s[len(s)-i-1]
309 b.WriteString("0x")
310 b.WriteString(frame.Addr.String())
311 b.WriteString(" ")
312
313 if frame.Addr.InSystemRange() && frame.Module == unbacked {
314 b.WriteString("?")
315 } else {
316 b.WriteString(frame.Module)
317 }
318
319 b.WriteRune('!')
320 if frame.Symbol != "" && frame.Symbol != "?" {
321 b.WriteString(frame.Symbol)
322 } else {
323 b.WriteRune('?')
324 }
325
326 if frame.Offset != 0 {
327 b.WriteString("+0x")
328 b.WriteString(strconv.FormatUint(frame.Offset, 16))
329 }
330
331 if i != len(s)-1 {
332 b.WriteRune('|')
333 }
334 }
335 return b.String()
336}
337
338// ContainsUnbacked returns true if there is a frame
339// pertaining to the function call initiated from the

Callers 1

TestCallstackFunction · 0.95

Calls 2

InSystemRangeMethod · 0.80
StringMethod · 0.65

Tested by 1

TestCallstackFunction · 0.76