On Wed, 2 Sep 2026 06:51:26 +0000 [email protected] wrote: > Is the documentation correct, or is the commit message correct?
The documentation and the selftests are correct. The commit message was stale. Reset clears the map and nothing else: it may run while tracing is active and leaves the ring buffer untouched. That is what the code, Documentation/trace/ftrace-stackmap.rst, stackmap-basic.tc and stackmap-reset.tc all implement. The v5 commit message still described the earlier design that required tracing to be stopped and cleared the buffer, which was dropped after Steven's feedback on the v4 thread (https://lore.kernel.org/all/20260821235129.078dd489@fedora/). v6 corrects the commit message on all three patches. > Would it make sense to add a similar cleanup trap here Yes. stackmap-instance-gate.tc now installs an EXIT cleanup trap instead of relying on the manual rmdir in fail(). It also records whether this test created instances/test_stackmap_gate, so cleanup removes the instance only in that case and a pre-existing instance is never removed on mkdir failure. Pengfei
