Closed Bug 1358583 Opened 8 years ago Closed 8 years ago

Profiling with MOZ_PROFILER_STARTUP shows the main thread of the main process unresponsive for the whole profile

Categories

(Core :: Gecko Profiler, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: florian, Assigned: mstange)

References

Details

Attachments

(1 file)

For an example, see the big red bar at the top of https://perfht.ml/2p03rJ0
ThreadResponsiveness is probably trying to dispatch an event to the main thread before the main thread's event loop has been set up.
Blocks: 1348023
OS: Unspecified → All
Hardware: Unspecified → All
Assignee: nobody → mstange
Status: NEW → ASSIGNED
Comment on attachment 8866013 [details] Bug 1358583 - Handle NS_DispatchToMainThread failures gracefully. https://reviewboard.mozilla.org/r/137608/#review140790 ::: tools/profiler/gecko/ThreadResponsiveness.cpp:24 (Diff revision 1) > public: > CheckResponsivenessTask() > : mLastTracerTime(TimeStamp::Now()) > , mMonitor("CheckResponsivenessTask") > , mTimer(nullptr) > + , mHasEverBeenDispatched(false) mHasEverBeenSuccessfullyDispatched would be clearer, but that might be too long. I'll let you decide. ::: tools/profiler/gecko/ThreadResponsiveness.cpp:46 (Diff revision 1) > + if (mHasEverBeenDispatched) { > + return; > + } > + > + nsresult rv = NS_DispatchToMainThread(this); > + // Dispatching can fail early during startup. Add "particularly when MOZ_PROFILER_STARTUP is used"?
Attachment #8866013 - Flags: review?(n.nethercote) → review+
Pushed by mstange@themasta.com: https://hg.mozilla.org/integration/autoland/rev/e0d7b3f048cd Handle NS_DispatchToMainThread failures gracefully. r=njn
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: