Confusing behaviour in area selection of multiple perf sample types
- Dominant language
- C++
- Stars
- 6.5k
- Forks
- 868
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 218
Description
Here's an example of an area selection I made just now
So this was a trace with many different types of callstacks involved. In https://github.com/google/perfetto/pull/4638, @cphlipot1 changed things so that, by default, the callstacks use the *perf counter* to weight the flamegraph. However, in mixed counter area selections like this, this can be quite misleading as you're only really seeing the callstacks visualized for one of the tracks you selected not all of them.
Some ideas:
1) We should make the flamegraph universally show sample count by default. This is a slight revert of https://github.com/google/perfetto/pull/4638 but is intuitive and clear for most people's usecases but will be annoying when you do care about the counter
2) We should do nothing - IMO not preferred due to the surprise factor.
3) We could make it so that if there's a single counter, we use the counter by default and if multiple we use sample count by default.
Personally, I'm leaning towards 3 but open to suggestions.
@cphlipot1 @rsavitski for thoughts
Contributor guide
Research direction
Review PR #4638 and reproduce the mixed-counter area selection shown in the issue. Resolve which default weighting behavior is intended, especially the proposed single-counter versus multiple-counter rule, then verify the flamegraph displays the agreed weighting for both single- and mixed-counter selections.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- data-visualization, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100