зеркало из https://github.com/mozilla/gecko-dev.git
86c0b62678
`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: - "In-session", we have a real buffer to write to and read from, - "Out-of-session", without buffer so reads&writes do nothing. This is implemented by enclosing the underlying `ModuloBuffer` and the entry deleter in a `Maybe`, which may be `Nothing` when the profiler is not running and the `ProfileBuffer`'s `BlocksRingBuffer` is out-of-session. Differential Revision: https://phabricator.services.mozilla.com/D41519 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
android | ||
baseprofiler | ||
build | ||
linker | ||
misc | ||
tests | ||
moz.build |