Closed Bug 1172229 Opened 9 years ago Closed 9 years ago

Profiler shows more than 100% of time in a recursive function

Categories

(DevTools :: Performance Tools (Profiler/Timeline), defect)

x86_64
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1167021

People

(Reporter: lth, Unassigned)

Details

Attachments

(1 file)

Attached image Screenshot
The profiler seems to be confused about recursion: it consistently shows > 100% of the time spent in a recursive function in a test case I have.  This is on today's mozilla-inbound but the problem is not new.

Attaching a screenshot.

Steps to reproduce:

From https://github.com/lars-t-hansen/flatjs/tree/master/demo/ray, get ray.html and ray.js.

Open ray.html in a fresh tab (takes about 5 seconds to load on my 2013 MacBook Pro; if your system is a lot slower than that you may have timeout issues).

Open the developer console, select the profiler.

Start profiling.  Hit Command-R to start the run.  When the run is done, stop the profiler.

Select the JS call graph view.  Select "Invert call graph" from the settings.  Select (by dragging along the timeline) the orange bar denoting JS execution.

Expand the call graph under trace() until you see raycolor.  Observe that its total time is greater than 100%, I typically see 120%.
We have a bug open for this (bug 1167021) -- and was wondering what could've caused a sample count higher than the root sample count -- so this solves the reason why this occurs, so thank you!
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: