Closed
Bug 1728056
Opened 3 years ago
Closed 3 years ago
Remove lock when profiling current thread in profiler_suspend_and_sample_thread
Categories
(Core :: Gecko Profiler, task, P3)
Core
Gecko Profiler
Tracking
()
RESOLVED
FIXED
93 Branch
Tracking | Status | |
---|---|---|
firefox93 | --- | fixed |
People
(Reporter: mozbugz, Assigned: mozbugz)
References
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Remaining TODO from bug 1722261:
// TODO: Remove this lock when on-thread sampling doesn't
// require it anymore.
PSAutoLock lock;
It was left for simplicity, as the lock is used in some parts of this code.
But it's only used in the "non-synchronous" code path, i.e., when sampling another thread.
So when sampling the current thread, we could avoid locking the profiler mutex.
Assignee | ||
Comment 1•3 years ago
|
||
The lock in the inner profiler_suspend_and_sample_thread
function was only needed on the !aIsAsynchronous
code path.
So instead, the pointer to the lock is passed in this case, otherwise nullptr
indicates that we're doing an asynchronous (same-thread) sampling.
Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a14cf6b742de
Remove lock when profiling current thread in profiler_suspend_and_sample_thread - r=canaltinova
Comment 3•3 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 3 years ago
status-firefox93:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•