Re: [PATCH v8 5/5] selftests/ftrace: Add a stackmap basic functionality test

From: Li Pengfei

Date: Sat Nov 07 2026 - 01:29:25 EST


From: Pengfei Li <lipengfei28@xxxxxxxxxx>

On Sat, 07 Nov 2026 06:07:50 +0000, sashiko-bot@xxxxxxxxxx wrote:

> Can clear_trace race with the resumed worker and leave the trace ring
> buffer empty when max_ref reaches 2?

Yes. Hits recorded between enable_tracing and clear_trace raise ref but
their cookies are cleared. The worker switches every 10 ms, so in
practice more events follow before tracing is disabled, but the test
should not depend on that. The next version clears the trace while the
worker is stopped and tracing is off, before resuming it on the last
iteration.

Thanks,
Pengfei Li