Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yushan Wang <wangyushan12@huawei.com>
To: Ian Rogers <irogers@google.com>
Cc: <peterz@infradead.org>, <mingo@redhat.com>, <acme@kernel.org>,
	<namhyung@kernel.org>, <mark.rutland@arm.com>,
	<alexander.shishkin@linux.intel.com>, <jolsa@kernel.org>,
	<adrian.hunter@intel.com>, <james.clark@arm.com>,
	<john.g.garry@oracle.com>, <will@kernel.org>,
	<mike.leach@arm.com>, <linux-perf-users@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <jic23@kernel.org>,
	<leo.yan@linux.dev>, <robin.murphy@arm.com>,
	<linuxarm@huawei.com>, <hejunhao3@huawei.com>,
	<prime.zeng@hisilicon.com>, <fanghao11@huawei.com>,
	<wangzhou1@hisilicon.com>
Subject: Re: [RFT PATCH v2 7/7] perf-iostat: Enable iostat mode for HiSilicon PCIe PMU
Date: Fri, 8 May 2026 18:36:36 +0800	[thread overview]
Message-ID: <f5ab300f-8368-4799-aa2c-11f8f3ee2e04@huawei.com> (raw)
In-Reply-To: <CAP-5=fXW7_kRBJ_B-iWnAFnwiN2OKD3WsA45JDD_Fqr4+cwTnQ@mail.gmail.com>

On 5/8/2026 12:20 AM, Ian Rogers wrote:
> On Wed, May 6, 2026 at 11:37 PM Yushan Wang <wangyushan12@huawei.com> wrote:

[...]

>> +
>> +static void __attribute__((constructor)) hisi_iostat_pmu_init(void)
>
> This looks good. My concerns are over:
>  - the use of the constructor attribute,
>  - the naming of iostat_pmu,
>  - we probably don't want a per PMU C file in tools/perf/util as there
> could be many,
>  - we might be able to move things into json and better share code, etc.
>
> Thanks,
> Ian

Hi Ian, thanks for the fast comments and reviewed-by tags, and sorry for the
delay of v2 patches.

I will try to merge those *_iostat.c into one file to avoid redundancy,
currently replacing iostat with json configs as a whole may be a huge work, but
eliminating redundant codes may not.

I think iostat can start by supporting variant platforms by providing structs
and callbacks, and migrate to totally json configurable for convenience of
extensibility in the future. After all, json metrics are firstly converted to a
big static string before being compiled into binary, and rebuild is necessary to
make any change of metric effective :)

Thanks,
Yushan

>
>> +{
>> +       unsigned int i;
>> +
>> +       for (i = 0; i < ARRAY_SIZE(hisi_iostat_pmu_list); i++)
>> +               register_iostat_pmu(&hisi_iostat_pmu_list[i]);
>> +}
>> --
>> 2.33.0
>>




      reply	other threads:[~2026-05-08 10:36 UTC|newest]

Thread overview: 20+ 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  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  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  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  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 [this message]

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=f5ab300f-8368-4799-aa2c-11f8f3ee2e04@huawei.com \
    --to=wangyushan12@huawei.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=fanghao11@huawei.com \
    --cc=hejunhao3@huawei.com \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=jic23@kernel.org \
    --cc=john.g.garry@oracle.com \
    --cc=jolsa@kernel.org \
    --cc=leo.yan@linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mark.rutland@arm.com \
    --cc=mike.leach@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=prime.zeng@hisilicon.com \
    --cc=robin.murphy@arm.com \
    --cc=wangzhou1@hisilicon.com \
    --cc=will@kernel.org \
    /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