From: Pengfei Li <ljdlns1987@gmail.com>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Mark Rutland <mark.rutland@arm.com>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
kernel test robot <lkp@intel.com>,
Bo Zhang <zhangbo56@xiaomi.com>,
Pengfei Li <lipengfei28@xiaomi.com>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [RFC PATCH v6 3/3] trace: add documentation, selftest and tooling for stackmap
Date: Tue, 8 Sep 2026 11:09:38 +0800 [thread overview]
Message-ID: <20260908030938.14046-1-lipengfei28@xiaomi.com> (raw)
In-Reply-To: <20260908103514.a1c61f51b84b8d67d6f0f511@kernel.org>
On Tue, 08 Sep 2026 10:35:14 +0900 Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
> Could you decouple tools/docs/tests in independent patches?
Yes. v7 splits this patch into the documentation, the userspace parser,
and the tests, each on its own.
> If each test has this volume description, it is enough to split those
> tests in independent patches.
Fair point -- the three tests cover unrelated properties and each needed
its own paragraph, which is the same signal you mentioned on the cover.
They become three patches in v7:
- basic functionality: stack_id events are produced and the map fills
- reset semantics: the map is cleared while the ring buffer is not,
plus the binary ABI header check
- instance gating: a secondary instance exposes neither the option
nor the stack_map* nodes, and writing the option there is rejected
Each lands after the interface it exercises, so no test references a
tracefs file that does not exist yet at that point in the series. The
reset test's ABI header check follows the binary export patch, which is
being reworked to a streaming seq_file export per your comment on 1/3,
so the check will match the final header layout.
> > + with open(args.file, 'rb') as f:
> > + data = f.read()
>
> nit: Can this support input from stdin? If we use this on android,
> user may want to do:
>
> adb shell cat /sys/.../stack_map_bin | python3 stackmap_dump.py
Good use case, and it is the common one on Android where pulling the
file first is an extra step. v7 makes the path argument optional and
reads sys.stdin.buffer when it is omitted or given as '-', so both
adb shell cat /sys/.../stack_map_bin | stackmap_dump.py
stackmap_dump.py /tmp/stack_map.bin
work. Reading from a pipe also suits the streaming export better than
the current stat-and-read pattern.
Pengfei
next prev parent reply other threads:[~2026-09-08 3:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 13:24 [RFC PATCH v6 0/3] trace: stack trace deduplication for ftrace ring buffer Pengfei Li
2026-09-03 13:24 ` [RFC PATCH v6 1/3] trace: add lock-free stackmap for stack trace deduplication Pengfei Li
2026-09-08 1:21 ` Masami Hiramatsu
2026-09-08 3:06 ` Pengfei Li
2026-09-03 13:24 ` [RFC PATCH v6 2/3] trace: integrate stackmap into ftrace stack recording path Pengfei Li
2026-09-03 13:24 ` [RFC PATCH v6 3/3] trace: add documentation, selftest and tooling for stackmap Pengfei Li
2026-09-08 1:35 ` Masami Hiramatsu
2026-09-08 3:09 ` Pengfei Li [this message]
2026-09-08 1:15 ` [RFC PATCH v6 0/3] trace: stack trace deduplication for ftrace ring buffer Masami Hiramatsu
2026-09-08 2:55 ` 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=20260908030938.14046-1-lipengfei28@xiaomi.com \
--to=ljdlns1987@gmail.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=lipengfei28@xiaomi.com \
--cc=lkp@intel.com \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=skhan@linuxfoundation.org \
--cc=zhangbo56@xiaomi.com \
/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