Linux Perf Users
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Yushan Wang" <wangyushan12@huawei.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [RFT PATCH v2 5/7] perf-iostat: Extend iostat interface to support different iostat PMUs
Date: Thu, 07 May 2026 21:52:43 +0000	[thread overview]
Message-ID: <20260507215243.C9B89C2BCB2@smtp.kernel.org> (raw)
In-Reply-To: <20260507063737.3542950-6-wangyushan12@huawei.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Cryptic failure during argument parsing on unsupported platforms due to removed error message.
--

commit a592ebf60ec05a2462f9e4e0f181c260df2632a7
Author: Shiju Jose <shiju.jose@huawei.com>

perf-iostat: Extend iostat interface to support different iostat PMUs

This commit extends the common iostat interface to provide support for
different PMUs. It allows each PMU to register itself and receive callbacks
for its specific functions through a unified framework.

> diff --git a/tools/perf/util/iostat.c b/tools/perf/util/iostat.c
> index a68ab100780d5..90607d1cf3fae 100644
> --- a/tools/perf/util/iostat.c
> +++ b/tools/perf/util/iostat.c

[ ... ]

> -__weak int iostat_parse(const struct option *opt __maybe_unused,
> -			 const char *str __maybe_unused,
> -			 int unset __maybe_unused)
> +__weak int iostat_parse(const struct option *opt, const char *str, int unset)
>  {
> -	pr_err("iostat mode is not supported on current platform\n");
> -	return -1;
> +	if (!iostat_pmu)
> +		return -1;

Does removing this error message cause a cryptic failure during argument
parsing on unsupported platforms?

Previously, if iostat was unsupported, it explicitly printed that the mode
was not supported on the current platform. Now, returning -1 from an option
callback without an error message causes the parser to abort and print a
generic error, such as an unknown option.

> +
> +	return iostat_pmu->parse(opt, str, unset);
>  }

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260507063737.3542950-1-wangyushan12@huawei.com?part=5

  parent reply	other threads:[~2026-05-07 21:52 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07  6:37 [RFT PATCH v2 0/7] perf tool: Support iostat for multiple platform Yushan Wang
2026-05-07  6:37 ` [RFT PATCH v2 1/7] perf stat: Check color's length instead of the pointer Yushan Wang
2026-05-07 15:33   ` Ian Rogers
2026-05-07  6:37 ` [RFT PATCH v2 2/7] perf stat: Save unnecessary print_metric() call Yushan Wang
2026-05-07 15:30   ` Ian Rogers
2026-05-07  6:37 ` [RFT PATCH v2 3/7] perf-x86: iostat: Move iostat arch-specific implementation to util Yushan Wang
2026-05-07 15:35   ` Ian Rogers
2026-05-08 10:34     ` Yushan Wang
2026-05-07 21:00   ` sashiko-bot
2026-05-07  6:37 ` [RFT PATCH v2 4/7] perf-x86: iostat: Change iostat_prefix() to static Yushan Wang
2026-05-07 15:39   ` Ian Rogers
2026-05-08 10:35     ` Yushan Wang
2026-05-07 21:21   ` sashiko-bot
2026-05-07  6:37 ` [RFT PATCH v2 5/7] perf-iostat: Extend iostat interface to support different iostat PMUs Yushan Wang
2026-05-07 15:47   ` Ian Rogers
2026-05-08 10:36     ` Yushan Wang
2026-05-07 21:52   ` sashiko-bot [this message]
2026-05-07  6:37 ` [RFT PATCH v2 6/7] perf-iostat: Make x86 iostat compatible with new iostat framework Yushan Wang
2026-05-07 16:17   ` Ian Rogers
2026-05-08 10:36     ` Yushan Wang
2026-05-07 22:13   ` sashiko-bot
2026-05-07  6:37 ` [RFT PATCH v2 7/7] perf-iostat: Enable iostat mode for HiSilicon PCIe PMU Yushan Wang
2026-05-07 16:20   ` Ian Rogers
2026-05-08 10:36     ` Yushan Wang
2026-05-07 22:35   ` sashiko-bot

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=20260507215243.C9B89C2BCB2@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sashiko@lists.linux.dev \
    --cc=wangyushan12@huawei.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