From: sashiko-bot@kernel.org
To: "Li Pengfei" <ljdlns1987@gmail.com>
Cc: linux-trace-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v5 2/3] trace: integrate stackmap into ftrace stack recording path
Date: Wed, 02 Sep 2026 06:54:32 +0000 [thread overview]
Message-ID: <20260902065433.2D6361F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260902064242.28606-3-lipengfei28@xiaomi.com>
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 <lipengfei28@xiaomi.com>
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/20260902064242.28606-1-lipengfei28@xiaomi.com?part=2
next prev parent reply other threads:[~2026-09-02 6:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 6:42 [RFC PATCH v5 0/3] trace: stack trace deduplication for ftrace ring buffer Li Pengfei
2026-09-02 6:42 ` [RFC PATCH v5 1/3] trace: add lock-free stackmap for stack trace deduplication Li Pengfei
2026-09-02 6:57 ` sashiko-bot
2026-09-03 13:19 ` Pengfei Li
2026-09-02 6:42 ` [RFC PATCH v5 2/3] trace: integrate stackmap into ftrace stack recording path Li Pengfei
2026-09-02 6:54 ` sashiko-bot [this message]
2026-09-03 13:21 ` Pengfei Li
2026-09-02 6:42 ` [RFC PATCH v5 3/3] trace: add documentation, selftest and tooling for stackmap Li Pengfei
2026-09-02 6:51 ` sashiko-bot
2026-09-03 13:22 ` Pengfei Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260902065433.2D6361F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=ljdlns1987@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox