tikv / pprof-rs

A Rust CPU profiler implemented with the help of backtrace-rs
Apache License 2.0
1.29k stars 99 forks source link

Add LRU cache for DWARF addr2line #178

Closed hehechen closed 1 year ago

hehechen commented 1 year ago

It seems that the overhead of dwarf resolving symbol is larger than that of frame pointer. Maybe we can add LRU cache to speed up the efficiency of dwarf resolving. The flame graph for dwarf profiling report: debug section compressed: 56b966b7-5d3a-4ab7-9ab9-8a9810ffc348 debug section decompressed: Fl1VR6cZxV

hehechen commented 1 year ago

The root cause is https://github.com/pingcap/tiflash/issues/6347#issuecomment-1333038382, so it's no need to add LRU cache in pprof-rs.