Stackprof mode: Garbage collection frames should not be stacked on their previous frame
- Dominant language
- TypeScript
- Stars
- 6.8k
- Forks
- 320
- PR merge metrics
- No merged PRs in 30d
Description
Stackprof (Ruby) mode displays garbage collection frames on top of the last recorded frame, but this is an inaccurate representation of the actual state.
This is because Stackprof is a sampling profiler, which means that consecutive frames in the dump were not necessarily executed consecutively. Garbage collection frames are not an execption here.
Stackprof's built-in flamegraph displays garbage collection frames on the root level (notice the `(garb...)` in the bottom left). I believe this style promotes the flamegraph's accuracy (which is important); what do you think?
|Stackprof's --d3-flamegraph|Speedscope|
|:--:|:--:|
|
|
|
Related code here:
https://github.com/jlfwong/speedscope/blob/6d02bf510fe8a0c29491eed176a36689927bfbb1/src/import/stackprof.ts#L38-L40
Contributor guide
Assessment
This issue has not been assessed yet.