grafana / pyroscope

Continuous Profiling Platform. Debug performance issues down to a single line of code
https://grafana.com/oss/pyroscope/
GNU Affero General Public License v3.0
9.97k stars 597 forks source link

feat: implement parent pointer tree recovery #3390

Closed kolesnikovae closed 3 months ago

kolesnikovae commented 3 months ago

The PR adds a way to convert a parent pointer tree to a full tree, which allows for tree traversal and quick reverse lookups (call site -> stack trace identifiers). This lightweight operation is instrumental for implementing #3219, #3384, #3220, and #2729. As of now, it is not used anywhere, but I'm afraid of forgetting the algorithm, so I'm adding it to the codebase.