dwarf/reader: precalcStack does not need to read past the first entry
It was reading all the way to the end of the debug_info section, slowing down stacktraces substantially. Benchmark before: BenchmarkConditionalBreakpoints-4 1 80344642562 ns/op Benchmark after: BenchmarkConditionalBreakpoints-4 1 22218288218 ns/op i.e. a reduction of the cost of a breakpoint hit from 8ms to 2.2ms Updates #1549
This commit is contained in:
parent
fc3e01bb5b
commit
7eddfb77b9
@ -426,6 +426,9 @@ childLoop:
|
|||||||
default:
|
default:
|
||||||
irdr.reader.SkipChildren()
|
irdr.reader.SkipChildren()
|
||||||
}
|
}
|
||||||
|
if rentry == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if rentry != nil && rentry.Tag == dwarf.TagInlinedSubroutine {
|
if rentry != nil && rentry.Tag == dwarf.TagInlinedSubroutine {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user