mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
b001bcf853
To ensure that a spare chunk is ready to handle data that will eventually overflow the current chunk, `ProfileChunkedBuffer` uses `ProfileBufferChunk::RequestChunk()` to queue a request for a new chunk. This request should be handled off-thread by the buffer user -- but a response is not guaranteed, so the buffer does not rely on it and can get a new chunk on the spot if really needed. Because the request is asynchronous, and because either the buffer or the user could be destroyed while a request is in flight, a shared `RequestedChunkRefCountedHolder` object is used: - When the request is handled, the new chunk (or nullptr) is given to the holder. - When the buffer needs a new chunk, it can retrieve the new chunk if the request was successfully fulfilled. If the requestee is destroyed first, the request won't be fulfilled and the buffer will carry on without relying on requests. If the requester is destroyed first, the holder (with a potential requested chunk) will just get destroyed after the request is fulfilled or the requestee is destroyed as well. Differential Revision: https://phabricator.services.mozilla.com/D69495 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
gtest | ||
interceptor | ||
moz.build | ||
ShowSSEConfig.cpp | ||
TestBaseProfiler.cpp | ||
TestNativeNt.cpp | ||
TestPEExportSection.cpp | ||
TestPrintf.cpp | ||
TestTimeStampWin.cpp |