gecko-dev/tools/profiler/public
Gerald Squelart 56736f31c3 Bug 1648507 - Distinguish pausing sampling only from pausing the whole profiler - r=canaltinova,perftest-reviewers,geckoview-reviewers,agi
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
2020-07-02 01:36:27 +00:00
..
ChildProfilerController.h Bug 1627490 - Replace MOZ_MUST_USE with [[nodiscard]] in tools/profiler. r=mstange 2020-04-07 18:38:52 +00:00
GeckoProfiler.h Bug 1648507 - Distinguish pausing sampling only from pausing the whole profiler - r=canaltinova,perftest-reviewers,geckoview-reviewers,agi 2020-07-02 01:36:27 +00:00
GeckoProfilerReporter.h
ProfileBufferEntrySerializationGeckoExtensions.h Bug 1622179 - Replace direct dependencies on BlocksRingBuffer with ProfileBufferEntryWriter's where possible - r=canaltinova 2020-03-16 20:32:35 +00:00
ProfileJSONWriter.h Bug 1512991 - Add JsonWriteFunc::Write to take string length. r=botond 2020-05-08 16:24:31 +00:00
ProfilerChild.h Bug 1648507 - Distinguish pausing sampling only from pausing the whole profiler - r=canaltinova,perftest-reviewers,geckoview-reviewers,agi 2020-07-02 01:36:27 +00:00
ProfilerCodeAddressService.h Bug 1648972 - Fix profiler non-unified build - r=canaltinova 2020-06-30 05:07:21 +00:00
ProfilerCounts.h Bug 1572337: ensure MainThread is registered with the profiler properly r=gerald 2019-11-08 21:07:29 +00:00
ProfilerMarkerPayload.h Bug 1613496 - Add IPC profiler markers to track when messages are processed by the IO thread queues r=gerald,froydnj 2020-06-30 18:39:42 +00:00
ProfilerParent.h Bug 1648507 - Distinguish pausing sampling only from pausing the whole profiler - r=canaltinova,perftest-reviewers,geckoview-reviewers,agi 2020-07-02 01:36:27 +00:00
shared-libraries.h