gecko-dev/mozglue/baseprofiler
Gerald Squelart 6ea0a33e9a Bug 1566706 - ModuloBuffer and BlocksRingBuffer can be given a external underlying buffer - r=gregtatum
By default `ModuloBuffer` allocates its own buffer on the heap.
Now `ModuloBuffer` adds two alternatives:
- Take ownership of a pre-allocated `UniquePtr<uint8_t>` buffer.
- Work over an unowned `uint8_t*` array. The caller is responsible for
  ownership, and ensuring that the array lives at least as long as the
  `ModuloBuffer`/`BlocksRingBuffer`.

`BlocksRingBuffer` can pass along these new options to its underlying
`ModuloBuffer`.

The main use will be for small on-stack `BlocksRingBuffer` that can store a
stack trace, or to more easily collect data (without allocating anything on the
heap) that can then go into the upcoming `ProfileBuffer`'s `BlocksRingBuffer`.

Differential Revision: https://phabricator.services.mozilla.com/D38285

--HG--
extra : moz-landing-system : lando
2019-07-19 00:56:18 +00:00
..
core Bug 1559000 - Enable/disable mozglue's AutoProfilerLabel when Base Profiler starts/stops - r=mstange 2019-07-04 04:39:08 +00:00
lul Bug 1492121 - Enclosing BaseProfiler in namespace mozilla::baseprofiler - r=njn 2019-06-06 06:20:03 +00:00
public Bug 1566706 - ModuloBuffer and BlocksRingBuffer can be given a external underlying buffer - r=gregtatum 2019-07-19 00:56:18 +00:00
moz.build Bug 1565137 - BlocksRingBuffer is a thread-safe variable-sized circular buffer - r=gregtatum 2019-07-16 07:57:24 +00:00