зеркало из https://github.com/mozilla/gecko-dev.git
56736f31c3
The profiler can be "paused", which stops sampling, and since bug 1578329 stops markers as well. Some test suites use pausing between tests (to better differentiate the tests, to keep the profiler ready to run, and to lower the amount of recorded data). But this causes problems with some tracing markers, as their matching ends have not been recorded (e.g., an end marker is missing), which show up as very loooong markers. To solve this, we need to be able to pause sampling only, but keep recording markers. But we still need to be able to pause the whole profiler, in particular before capturing, to avoid recording anything around that time. This big patch is mostly mechanical changes: Wherever there are "Pause" and "Unpause/Resume" profiler functions, we add matching "PauseSampling" and "UnpauseSampling/ResumeSampling" functions that only impact the periodic sampling loop; And existing "Pause/Unpause/Resume" imply pausing sampling as well. Exceptions and extra work: - nsIProfiler (the JS API) already had `Pause/ResumeSampling()`, which misleadingly paused everything! Now they do the right thing, and we have `Pause/Resume()` as well. - All tests using `Pause/ResumeSampling()` now use `Pause/Resume()`, except for Talos tests that only pause sampling between tests; Added some extra `Pause()` calls to pause everything before capturing profiles. - GeckoJavaSampler doesn't handle pausing/resuming everything, this should be done in a follow-up bug. - Sampling-only pauses are not streamed into JSON. If needed, we should follow-up, with potential work on the front-end to deal with these. Differential Revision: https://phabricator.services.mozilla.com/D81492 |
||
---|---|---|
.. | ||
ChildProfilerController.h | ||
GeckoProfiler.h | ||
GeckoProfilerReporter.h | ||
ProfileBufferEntrySerializationGeckoExtensions.h | ||
ProfileJSONWriter.h | ||
ProfilerChild.h | ||
ProfilerCodeAddressService.h | ||
ProfilerCounts.h | ||
ProfilerMarkerPayload.h | ||
ProfilerParent.h | ||
shared-libraries.h |