tracing, perf_events: Protect the buffer from recursion in perf