On Mon, 5 May 2025 08:42:52 -0700 Doug Anderson <[email protected]> wrote:
> This new change seems less safe than the old one. Previously you'd Well, it matters what you your definition of "safe" is ;-) The new change prevents the ring buffer from having anything written to it, where as the old change didn't disable everything. > always increment by one at the start of the function and decrement by > one at the end. Now at the start of the function you'll set > "buffer_disabled" to 1 and at the end you'll set it to 0. If > "buffer_disabled" was already 1 at the start of the function your new > sequence will end up having the side effect of changing it to 0. Good point. How about I add a tracer_tracing_disable() and tracer_tracing_enable() that is not an on off switch and uses: ring_buffer_disable/enable() that decrements/increments disabling of the ring buffer? That way it keeps the same semantics. -- STeve
