Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFT PATCH v2 0/7] perf tool: Support iostat for multiple platform
@ 2026-05-07  6:37 Yushan Wang
  2026-05-07  6:37 ` [RFT PATCH v2 1/7] perf stat: Check color's length instead of the pointer Yushan Wang
                   ` (6 more replies)
  0 siblings, 7 replies; 20+ messages in thread
From: Yushan Wang @ 2026-05-07  6:37 UTC (permalink / raw)
  To: peterz, mingo, acme, namhyung, mark.rutland, alexander.shishkin,
	jolsa, irogers, adrian.hunter, james.clark, john.g.garry, will,
	mike.leach, linux-perf-users, linux-kernel, linux-arm-kernel
  Cc: jic23, leo.yan, robin.murphy, linuxarm, hejunhao3, prime.zeng,
	fanghao11, wangzhou1, wangyushan12

Currently, platform-specific iostat code for PMUs is implemented as a
common iostat callback interface and invoked based on what is being
built. This approach limits support for iostat across different types of
PMUs.

Support of HiSilicon PCIe PMU iostat was raised at [1], which uses the
similar approach.

To extend support of iostat across platforms, change common iostat
interface to framework to allow perf to probe PMU capabilities during
runtime and route iostat request to the correct PMU-specific functions.
Then HiSilicon PCIe PMU iostat is supported with the new framework.

Request For Test:
Refactors has been made to x86 iostat to adapt the iostat framework, the
probe function that checks if there's any PMU's name contains
'uncore_iio' may not work properly, tests of that would be appreciated.

[1] https://lore.kernel.org/all/20240208032518.25830-1-yangyicong@huawei.com/

Changes:

RFT v2:
- Replace typedefs with plain function pointer declaration.
- Replace _Bool with bool with the help of stdbool.h.
- Moved architecture-specific iostat implementation code to utils
  directory per Ian.
- Dropped PMU wildcard matching variation, and changed pmu_name to
  pmu_name_wildcard for wildcard PMU name matching.
- Changed PMU name pattern of x86 iostat to "uncore_iio".
- Minor refactors to iostat framework.
Link: https://lore.kernel.org/all/20260126123514.3238425-1-wangyushan12@huawei.com

Shiju Jose (2):
  perf-iostat: Extend iostat interface to support different iostat PMUs
  perf-iostat: Make x86 iostat compatible with new iostat framework

Yicong Yang (1):
  perf-iostat: Enable iostat mode for HiSilicon PCIe PMU

Yushan Wang (4):
  perf stat: Check color's length instead of the pointer
  perf stat: Save unnecessary print_metric() call
  perf-x86: iostat: Move iostat arch-specific implementation to util
  perf-x86: iostat: Change iostat_prefix() to static

 tools/perf/arch/x86/util/Build                |   1 -
 tools/perf/builtin-script.c                   |   2 +-
 tools/perf/util/Build                         |   2 +
 tools/perf/util/hisi-iostat.c                 | 478 ++++++++++++++++++
 tools/perf/util/iostat.c                      |  89 +++-
 tools/perf/util/iostat.h                      |  40 +-
 tools/perf/util/stat-display.c                |   4 +-
 tools/perf/util/stat-shadow.c                 |   4 +-
 .../x86/util/iostat.c => util/x86-iostat.c}   | 100 ++--
 9 files changed, 650 insertions(+), 70 deletions(-)
 create mode 100644 tools/perf/util/hisi-iostat.c
 rename tools/perf/{arch/x86/util/iostat.c => util/x86-iostat.c} (85%)

-- 
2.33.0



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2026-05-08 10:36 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox