BlocksRingBuffer can switch underlying buffer
Categories
(Core :: Gecko Profiler, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: mozbugz, Assigned: mozbugz)
References
Details
Attachments
(1 file)
BlocksRingBuffer
will be used both inside and outside ProfileBuffer
:
- Inside to serve as
ProfileBuffer
's main storage for stack traces, - Outside to allow marker storage even when
ProfileBuffer
is locked during
stack sampling.
ProfileBuffer
only exists while ActivePS
is alive, but because of the
potential outside accesses above (due to small races between ProfileBuffer
shutdown, and thread-local IsBeingProfiled() flags), we cannot just do the same
for BlocksRingBuffer, and it must remain alive to gracefully deny these accesses
around the profiler startup and shutdown times.
To accomplish this, BlocksRingBuffer
may be in different states.
This is done by enclosing the underlying ModuloBuffer
and the entry deleter in
a Maybe
, which may be Nothing
when the profiler is not running.
Assignee | ||
Comment 1•5 years ago
|
||
BlocksRingBuffer
will be used both inside and outside ProfileBuffer
:
- Inside to serve as
ProfileBuffer
's main storage for stack traces, - Outside to allow marker storage even when
ProfileBuffer
is locked during
stack sampling.
ProfileBuffer
only exists while ActivePS
is alive, but because of the
potential outside accesses above (due to small races between ProfileBuffer
shutdown, and thread-local IsBeingProfiled() flags), we cannot just do the same
for BlocksRingBuffer, and it must remain alive to gracefully deny these accesses
around the profiler startup and shutdown times.
To accomplish this, BlocksRingBuffer
may be in different states.
This is done by enclosing the underlying ModuloBuffer
and the entry deleter in
a Maybe
, which may be Nothing
when the profiler is not running.
Comment 3•5 years ago
|
||
Backed out changeset 58dd47c5aa51 (bug 1573111) for build bustages at TestBaseProfiler.cpp:875:51.
Backout: https://hg.mozilla.org/integration/autoland/rev/2813bdfb93a35a385de03731279471e82f2ea8c6
Push that started the failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=pending%2Crunning%2Csuccess%2Ctestfailed%2Cbusted%2Cexception&revision=58dd47c5aa51acc3095c623148df986354dfbf72&selectedJob=261260792
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=261260792&repo=autoland&lineNumber=34692
Comment 5•5 years ago
|
||
bugherder |
Assignee | ||
Comment 6•5 years ago
|
||
(forgot to clear NI -- fixed and landed now.)
Description
•