Closed Bug 830990 Opened 11 years ago Closed 7 years ago

Stop dispatching CheckResponsivenessEvents when the profiler is stopped

Categories

(Core :: Gecko Profiler, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: anton, Assigned: mstange)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

If you start a profiler and then stop it, Firefox still outputs stuff like "MOZ_EVENT_TRACE sample 1358286962225 20" which means that event tracer is still running. BenWa on IRC suggested that we need to turn off event tracer together with the profiler.
Blocks: 1329212
ThreadResponsiveness starts dispatching CheckResponsivenessEvents the first time ThreadResponsiveness::Update is called, and only stops doing so in the ~ThreadResponsiveness destructor. The ThreadResponsiveness object is stored in a field of the main thread's ThreadInfo object, and is only destroyed once the profiler shuts down.
We could fix this by notifying ThreadInfo when the profiler is started + stopped, and .emplace() and .reset() mResponsiveness at those times. (And we'd need to change the MOZ_ASSERT(!!responsiveness == mIsMainThread) assertion.)
Summary: Turn off event tracer when profiler is stopped → Stop dispatching CheckResponsivenessEvents when the profiler is stopped
Comment on attachment 8858652 [details]
Bug 830990 - Stop dispatching CheckResponsivenessEvents when the profiler is stopped.

https://reviewboard.mozilla.org/r/130632/#review133550
Attachment #8858652 - Flags: review?(n.nethercote) → review+
Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/9d86f0c3ddd4
Stop dispatching CheckResponsivenessEvents when the profiler is stopped. r=njn
Assignee: nobody → mstange
Status: NEW → ASSIGNED
Flags: needinfo?(mstange)
Backout by ihsiao@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0c487f6dc896
Backed out changeset 9d86f0c3ddd4 for build bustage
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again.

hg error in cmd: hg rebase -s 2e6e8b354983 -d 5d3957c7d732: rebasing 390340:2e6e8b354983 "Bug 830990 - Stop dispatching CheckResponsivenessEvents when the profiler is stopped. r=njn" (tip)
merging tools/profiler/core/ThreadInfo.cpp
merging tools/profiler/core/ThreadInfo.h
warning: conflicts while merging tools/profiler/core/ThreadInfo.cpp! (edit, then use 'hg resolve --mark')
unresolved conflicts (see hg resolve, then hg rebase --continue)
Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/29cd64bf901f
Stop dispatching CheckResponsivenessEvents when the profiler is stopped. r=njn
https://hg.mozilla.org/mozilla-central/rev/29cd64bf901f
Status: ASSIGNED → RESOLVED
Closed: 7 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: