Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] Commit message claims ring buffer is reset, but code explicitly avoids it, leaving an unused exported function. --
commit 1c84dfe93f15f95df9476204e9b82e02328ae613 Author: Pengfei Li <[email protected]> trace: integrate stackmap into ftrace stack recording path Add TRACE_STACK_ID event type and integrate ftrace_stackmap into __ftrace_trace_stack(). When the 'stackmap' trace option is enabled, the stack recording path stores a 4-byte stack_id in the ring buffer instead of the full stack trace. > - ftrace_stackmap_create() takes the owning trace_array so the > stackmap can later clear that trace_array's buffers during reset. [Severity: Medium] The commit message claims that the stackmap clears the trace_array's buffers during reset, but the actual stackmap implementation avoids doing this. Could the commit message be updated to reflect that the buffers are not cleared? > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c > index 18710c190c924..0210dc597f77d 100644 > --- a/kernel/trace/trace.c > +++ b/kernel/trace/trace.c [ ... ] > @@ -1562,7 +1564,7 @@ void tracing_reset_online_cpus(struct array_buffer *buf) > ring_buffer_record_enable(buffer); > } > > -static void tracing_reset_all_cpus(struct array_buffer *buf) > +void tracing_reset_all_cpus(struct array_buffer *buf) > { > struct trace_buffer *buffer = buf->buffer; > [ ... ] > diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h > index 80fe152af1dd8..95db43bfc747a 100644 > --- a/kernel/trace/trace.h > +++ b/kernel/trace/trace.h [ ... ] > @@ -689,6 +695,7 @@ extern int tracing_disabled; > int tracer_init(struct tracer *t, struct trace_array *tr); > int tracing_is_enabled(void); > void tracing_reset_online_cpus(struct array_buffer *buf); > +void tracing_reset_all_cpus(struct array_buffer *buf); > void tracing_reset_all_online_cpus(void); [Severity: Medium] Does this code unnecessarily export tracing_reset_all_cpus() outside of trace.c? Since the stackmap reset functionality does not actually clear the ring buffers, it seems this function is left completely unused externally. -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=2
