Costs still wrong with flattened recursion toggled on

RESOLVED FIXED in Firefox 42

Status

()

Firefox
Developer Tools: Performance Tools (Profiler/Timeline)
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: shu, Assigned: shu)

Tracking

unspecified
Firefox 42
Points:
---

Firefox Tracking Flags

(firefox42 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
We overcount frames when flattening recursion.
(Assignee)

Comment 1

3 years ago
Created attachment 8625980 [details] [diff] [review]
Don't overcount samples when flattening recursion.
(Assignee)

Updated

3 years ago
Assignee: nobody → shu
Status: NEW → ASSIGNED
To deal with recursion, this would work, but wouldn't affect the use-case of any kind of repetitive calls in the stack, like A()->B()->C()->B()->D() -- B would be counted twice. I think I have a way to fix both adjacent repeated calls, and otherwise.
(Assignee)

Comment 3

3 years ago
Oops, I forgot to land this.

(In reply to Jordan Santell [:jsantell] [@jsantell] from comment #2)
> To deal with recursion, this would work, but wouldn't affect the use-case of
> any kind of repetitive calls in the stack, like A()->B()->C()->B()->D() -- B
> would be counted twice. I think I have a way to fix both adjacent repeated
> calls, and otherwise.

Those two B frames in your example should be counted twice. Remember that the sample count is tied to each row in the call tree, not to some function. In your example, B would have two different rows, and should be counted twice. 

The bug here was that recursion flattening flattens multiple rows into a single row, and we were overcounting for the single flattened row.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/c8066db6f2e9
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox42: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
You need to log in before you can comment on or make changes to this bug.