Closed Bug 1447338 Opened 2 years ago Closed Last year

Add a "responsiveness" feature so that we can turn off event loop instrumentation on demand


(Core :: Gecko Profiler, enhancement)

Not set



Tracking Status
firefox61 --- wontfix
firefox62 --- fixed


(Reporter: mstange, Assigned: gregtatum)




(1 file)

At the moment, starting the profiler causes it to submit an event to all threads with a Gecko event loop every 16ms, in order to instrument the responsiveness of those threads.

Sometimes, you expect a thread to be idle, and in the profile it shows up as being not entirely idle. In order to track down whether this unexpected activity is caused by the profiler's instrumentation or by something else, it would be nice to be able to toggle them separately.
There's a patch in bug 1439014 that demonstrates how to add a new profiler feature. If the feature is absent, we should not create ThreadResponsiveness objects. Here's where those get created:
Assignee: nobody → gtatum
Comment on attachment 8963344 [details]
Bug 1447338 - Add thread "responsiveness" as a configurable feature to the Gecko Profiler;

::: tools/profiler/core/ProfiledThreadData.h:67
(Diff revision 1)
>    void StreamJSON(const ProfileBuffer& aBuffer, JSContext* aCx,
>                    SpliceableJSONWriter& aWriter,
>                    const mozilla::TimeStamp& aProcessStartTime,
>                    double aSinceTime);
> -  // Returns nullptr if this is not the main thread or if this thread is not
> +  // Returns nullptr if this is not the main thread, the responsiveness

"this is not the main thread, " is no longer accurate and should be removed. (This is an existing issue.)
Attachment #8963344 - Flags: review?(mstange) → review+
This work is blocked from landing by a patch needed in the Gecko Profiler Addon:
This patch landed:

However, I'd like to wait a bit longer for the updates to propagate to users, as it might be surprising if their extensions is out of date while profiling nightly, and the responsiveness feature is not there.
Depends on: 1454061
This second push is trying a fix for the failure on Android. If that is green then this should be good to merge.
Pushed by
Add thread "responsiveness" as a configurable feature to the Gecko Profiler; r=mstange
I pushed to try from my local commit, but failed to push that up to reviewboard. Doing that now and re-landing.
Pushed by
Add thread "responsiveness" as a configurable feature to the Gecko Profiler; r=mstange
Backed out changeset 35089098baf8 (bug 1447338) for mochitest chrome failures on test_perf-settings-features.html


Push with failures:

Failure log:

16:13:13     INFO -  249 INFO SimpleTest START
16:13:13     INFO -  250 INFO TEST-START | devtools/client/performance-new/test/chrome/test_perf-settings-entries.html
16:13:13     INFO -  GECKO(6132) | ++DOMWINDOW == 27 (0000020B2917EC00) [pid = 6132] [serial = 27] [outer = 0000020B21054000]
16:13:14     INFO -  GECKO(6132) | ++DOMWINDOW == 28 (0000020B2AAA1400) [pid = 6132] [serial = 28] [outer = 0000020B21054000]
16:13:15     INFO -  GECKO(6132) | MEMORY STAT | vsize 2098979MB | vsizeMaxContiguous 129936686MB | residentFast 317MB | heapAllocated 134MB
16:13:15     INFO -  251 INFO TEST-OK | devtools/client/performance-new/test/chrome/test_perf-settings-entries.html | took 1560ms
16:13:15     INFO -  GECKO(6132) | ++DOMWINDOW == 29 (0000020B2BA04400) [pid = 6132] [serial = 29] [outer = 0000020B21054000]
16:13:15     INFO -  252 INFO None253 INFO TEST-START | devtools/client/performance-new/test/chrome/test_perf-settings-features.html
16:13:15     INFO -  GECKO(6132) | ++DOMWINDOW == 30 (0000020B2BA05800) [pid = 6132] [serial = 30] [outer = 0000020B21054000]
16:13:15     INFO -  TEST-INFO | started process screenshot
16:13:15     INFO -  TEST-INFO | screenshot: exit 0
16:13:15    ERROR -  254 INFO TEST-UNEXPECTED-FAIL | devtools/client/performance-new/test/chrome/test_perf-settings-features.html | The features starts out with the default - got "js,stackwalk,responsiveness", expected "js,stackwalk"
Flags: needinfo?(gtatum)
Pushed by
Add thread "responsiveness" as a configurable feature to the Gecko Profiler; r=mstange
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Flags: needinfo?(gtatum)
Depends on: 1467111
Depends on: 1489817
You need to log in before you can comment on or make changes to this bug.