[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJpZYjV_XquU785dhOPVGM7k9N_6QV+1OxenXLj4-fbDCj=yWg@mail.gmail.com>
Date: Tue, 3 Jun 2025 09:21:24 -0700
From: Chun-Tse Shao <ctshao@...gle.com>
To: linux-kernel@...r.kernel.org
Cc: Ian Rogers <irogers@...gle.com>, peterz@...radead.org, mingo@...hat.com,
acme@...nel.org, namhyung@...nel.org, mark.rutland@....com,
alexander.shishkin@...ux.intel.com, jolsa@...nel.org, adrian.hunter@...el.com,
kan.liang@...ux.intel.com, linux-perf-users@...r.kernel.org
Subject: Re: [PATCH v1] perf test: Restrict uniquifying test to machines with uncore_imc
Ping.
Thanks,
CT
On Wed, May 21, 2025 at 3:45 PM Chun-Tse Shao <ctshao@...gle.com> wrote:
>
> The test would fail if target machine does not have `uncore_imc` devices.
> Since event uniquifying behavior is similar among different
> architectures, we are restricting the test to only run on machines with
> `uncore_imc` devices.
>
> Suggested-by: Ian Rogers <irogers@...gle.com>
> Signed-off-by: Chun-Tse Shao <ctshao@...gle.com>
> ---
> tools/perf/tests/shell/stat+event_uniquifying.sh | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/tests/shell/stat+event_uniquifying.sh b/tools/perf/tests/shell/stat+event_uniquifying.sh
> index 5ec35c52b7d9..5a51fbaa13bb 100755
> --- a/tools/perf/tests/shell/stat+event_uniquifying.sh
> +++ b/tools/perf/tests/shell/stat+event_uniquifying.sh
> @@ -9,7 +9,8 @@ perf_tool=perf
> err=0
>
> test_event_uniquifying() {
> - # We use `clockticks` to verify the uniquify behavior.
> + # We use `clockticks` in `uncore_imc` to verify the uniquify behavior.
> + pmu="uncore_imc"
> event="clockticks"
>
> # If the `-A` option is added, the event should be uniquified.
> @@ -43,11 +44,17 @@ test_event_uniquifying() {
> echo "stat event uniquifying test"
> uniquified_event_array=()
>
> + # Skip if the machine does not have `uncore_imc` device.
> + if ! ${perf_tool} list pmu | grep -q ${pmu}; then
> + echo "Target does not support pmu ${pmu} [Skipped]"
> + return
> + fi
> +
> # Check how many uniquified events.
> while IFS= read -r line; do
> uniquified_event=$(echo "$line" | awk '{print $1}')
> uniquified_event_array+=("${uniquified_event}")
> - done < <(${perf_tool} list -v ${event} | grep "\[Kernel PMU event\]")
> + done < <(${perf_tool} list -v ${event} | grep ${pmu})
>
> perf_command="${perf_tool} stat -e $event -A -o ${stat_output} -- true"
> $perf_command
> --
> 2.49.0.1143.g0be31eac6b-goog
>
Powered by blists - more mailing lists