mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
Bug 1572235: Expose a method to remove markers leftover from previous runs of the profiler. r=gerald
Differential Revision: https://phabricator.services.mozilla.com//D41275 --HG-- extra : histedit_source : c73fed719d5e5e607ede15bbbf74ed5554083b21
This commit is contained in:
parent
d5c11f21a0
commit
3050e35cce
@ -133,6 +133,16 @@ class ProfilerSignalSafeLinkedList {
|
||||
abort();
|
||||
}
|
||||
|
||||
reset();
|
||||
}
|
||||
|
||||
// Reset the list of pending signals in this list.
|
||||
// We assume that this is called at a time when it is
|
||||
// guaranteed that no more than a single user (the caller)
|
||||
// is accessing the list. In particular, it is only
|
||||
// called from within the RacyRegisteredThread::ReinitializeOnResume
|
||||
// method.
|
||||
void reset() {
|
||||
while (mList.peek()) {
|
||||
delete mList.popHead();
|
||||
}
|
||||
|
@ -59,6 +59,8 @@ class RacyRegisteredThread final {
|
||||
// This is called on every profiler restart. Put things that should happen at
|
||||
// that time here.
|
||||
void ReinitializeOnResume() {
|
||||
mPendingMarkers.reset();
|
||||
|
||||
// This is needed to cause an initial sample to be taken from sleeping
|
||||
// threads that had been observed prior to the profiler stopping and
|
||||
// restarting. Otherwise sleeping threads would not have any samples to
|
||||
|
Loading…
Reference in New Issue
Block a user