[RFT PATCH v2 7/7] perf-iostat: Enable iostat mode for HiSilicon PCIe PMU
Yushan Wang
wangyushan12 at huawei.com
Fri May 8 03:36:36 PDT 2026
On 5/8/2026 12:20 AM, Ian Rogers wrote:
> On Wed, May 6, 2026 at 11:37 PM Yushan Wang <wangyushan12 at 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
>>
More information about the linux-arm-kernel
mailing list