jlfwong / jlfwong/speedscope

Stackprof mode: Garbage collection frames should not be stacked on their previous frame

Open
#361 1 comment 0 reactions 0 assignees View on GitHub
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|
|:--:|:--:|
|Screen Shot 2021-08-20 at 18 49 24|Screen Shot 2021-08-20 at 18 40 15|

Related code here:

https://github.com/jlfwong/speedscope/blob/6d02bf510fe8a0c29491eed176a36689927bfbb1/src/import/stackprof.ts#L38-L40

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.