From: sashiko-bot@kernel.org
To: "Aaron Tomlin" <atomlin@atomlin.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v7 2/4] perf sched: Handle missing trace samples in pipe mode
Date: Sun, 02 Aug 2026 21:29:36 +0000 [thread overview]
Message-ID: <20260802212937.4F0EC1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260802210914.199941-3-atomlin@atomlin.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Missing explicit `<string.h>` inclusion for `strcmp()`, violating musl compatibility guidelines.
--
--- Patch [2]: [PATCH v7 2/4] perf sched: Handle missing trace samples in pipe mode ---
commit 204b30b0b1a2539fa7ad4c2b18b98020812488df
Author: Aaron Tomlin <atomlin@atomlin.com>
perf sched: Handle missing trace samples in pipe mode
This commit improves the handling of missing trace samples when perf is
running in pipe mode. It dynamically registers missing callbacks, moves the
trace handlers array to file-scope, and dynamically assigns handlers.
> diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
> index 94a323da0799a..232e72537df36 100644
> --- a/tools/perf/builtin-sched.c
> +++ b/tools/perf/builtin-sched.c
[ ... ]
> @@ -1946,7 +1962,22 @@ static int perf_sched__process_tracepoint_sample(const struct perf_tool *tool __
> struct evsel *evsel = sample->evsel;
> int err = 0;
>
> - if (evsel->handler != NULL) {
> + if (evsel->handler == NULL) {
> + evsel->handler = process_sched_ignore;
> + for (size_t i = 0; i < ARRAY_SIZE(latency_handlers); i++) {
> + if (evsel__name_is(evsel, latency_handlers[i].name)) {
> + if (!strcmp(latency_handlers[i].name, "sched:sched_wakeup") &&
^^^^^^^^
[Severity: Low]
Does this file need an explicit #include <string.h>?
The perf tools musl compatibility guidelines require all POSIX libc functions
like strcmp() to have explicit, direct header inclusions to prevent musl
compilation failures, rather than relying on implicit inclusions through
other headers.
> + sample->evsel->evlist &&
> + evlist__find_tracepoint_by_name(sample->evsel->evlist, "sched:sched_waking"))
> + evsel->handler = process_sched_wakeup_ignore;
> + else
> + evsel->handler = latency_handlers[i].handler;
> + break;
> + }
> + }
> + }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260802210914.199941-1-atomlin@atomlin.com?part=2
next prev parent reply other threads:[~2026-08-02 21:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-02 21:09 [PATCH v7 0/4] perf sched latency: Refine outputs, unit scaling, and histogram support Aaron Tomlin
2026-08-02 21:09 ` [PATCH v7 1/4] perf sched: Suppress latency table output when trace samples are missing Aaron Tomlin
2026-08-02 21:09 ` [PATCH v7 2/4] perf sched: Handle missing trace samples in pipe mode Aaron Tomlin
2026-08-02 21:29 ` sashiko-bot [this message]
2026-08-03 17:59 ` Namhyung Kim
2026-08-05 19:58 ` Aaron Tomlin
2026-08-02 21:09 ` [PATCH v7 3/4] perf sched latency: Auto-scale latency and runtime display units Aaron Tomlin
2026-08-02 21:09 ` [PATCH v7 4/4] perf sched latency: Add histogram and time interval options Aaron Tomlin
2026-08-03 18:06 ` Namhyung Kim
2026-08-05 20:16 ` Aaron Tomlin
2026-08-04 17:11 ` [PATCH v7 0/4] perf sched latency: Refine outputs, unit scaling, and histogram support Namhyung Kim
2026-08-05 20:19 ` Aaron Tomlin
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=20260802212937.4F0EC1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=atomlin@atomlin.com \
--cc=linux-perf-users@vger.kernel.org \
--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