Gerald Squelart 4199f5065e Bug 1734867 - Use single static buffer when capturing stacks for main-thread markers - r=florian
The main thread is the busiest, so it benefits the most from having its own chunked buffer. This removes one allocation when capturing a marker stack on the main thread of each process.
That buffer is allocated when the first profiler starts, and is destroyed when the last profiler stops.

Note: Further improvements are possible (e.g.: Pool of pre-allocated buffers, attempting to use a stack-based buffer, etc.), but they are more complex and will require more work in future bugs.

Differential Revision: https://phabricator.services.mozilla.com/D133725
2021-12-17 05:27:06 +00:00
..