public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Veronika Molnarova <vmolnaro@redhat.com>
To: Ian Rogers <irogers@google.com>
Cc: linux-perf-users@vger.kernel.org, acme@kernel.org,
	acme@redhat.com, mpetlan@redhat.com, peterz@infradead.org,
	mingo@redhat.com, namhyung@kernel.org, mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com, jolsa@kernel.org,
	adrian.hunter@intel.co, kan.liang@linux.intel.com,
	yangyicong@hisilicon.com, tim.c.chen@linux.intel.com
Subject: Re: [PATCH] perf test: Parse perf stat Topdown events for aarch64
Date: Tue, 10 Dec 2024 16:13:27 +0100	[thread overview]
Message-ID: <51789413-f4d4-4085-afeb-aedffc36c3c3@redhat.com> (raw)
In-Reply-To: <CAP-5=fWfjB9O_oR7k5xCoKYHVL3t6tppvemZewW=q2PWh-da8Q@mail.gmail.com>



On 11/18/24 22:31, Ian Rogers wrote:
> On Mon, Nov 18, 2024 at 2:04 AM Veronika Molnarova <vmolnaro@redhat.com> wrote:
>>
>>
>>
>> On 10/29/24 16:25, Ian Rogers wrote:
>>> On Tue, Oct 29, 2024 at 7:44 AM <vmolnaro@redhat.com> wrote:
>>>>
>>>> From: Veronika Molnarova <vmolnaro@redhat.com>
>>>>
>>>> The 'perf stat' output on aarch64 machines with topdown events wasn't
>>>> counted for in the 'perf stat STD output linter' test case. Add the
>>>> topdown metric to the skip_metric list as it is done for topdown events
>>>> on other systems.
>>>>
>>>> The Topdown events are also disabled on aarch64 KVM guests because the
>>>> value of caps/slots is set to 0 due to the part of the system register
>>>> being a stub. This prevents the metric for the topdown events from being
>>>> computed, leaving the 'perf stat' topdown metric without any value at
>>>> all. Add the "TopdownL1" to the skip_metric list as well to handle this
>>>> possibility.
>>>>
>>>> Before aarch64:
>>>>
>>>>     100: perf stat STD output linter:
>>>>     --- start ---
>>>>     test child forked, pid 403305
>>>>     Checking STD output: no args Unknown event name in TopdownL1                 #      4.3 percent of slots  slots_lost_misspeculation_fraction
>>>>     ---- end(-1) ----
>>>>     100: perf stat STD output linter                                     : FAILED!
>>>>
>>>> Before aarch64 KVM:
>>>>
>>>>     100: perf stat STD output linter:
>>>>     --- start ---
>>>>     test child forked, pid 404671
>>>>     Checking STD output: no args Unknown event name in TopdownL1
>>>>     ---- end(-1) ----
>>>>     100: perf stat STD output linter                                     : FAILED!
>>>>
>>>> After:
>>>>
>>>>     100: perf stat STD output linter:
>>>>     --- start ---
>>>>     test child forked, pid 404777
>>>>     Checking STD output: no args [Success]
>>>>     Checking STD output: system wide [Success]
>>>>     Checking STD output: interval [Success]
>>>>     Checking STD output: per thread [Success]
>>>>     Checking STD output: per node [Success]
>>>>     Checking STD output: system wide no aggregation [Success]
>>>>     Checking STD output: per core [Success]
>>>>     Checking STD output: per cache instance [Success]
>>>>     Checking STD output: per cluster [Success]
>>>>     Checking STD output: per die [Success]
>>>>     Checking STD output: per socket [Success]
>>>>     ---- end(0) ----
>>>>     100: perf stat STD output linter                                     : Ok
>>>>
>>>> Signed-off-by: Veronika Molnarova <vmolnaro@redhat.com>
>>>>
>>>> ---
>>>>  tools/perf/tests/shell/stat+std_output.sh | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/tools/perf/tests/shell/stat+std_output.sh b/tools/perf/tests/shell/stat+std_output.sh
>>>> index cbf2894b2c846a04..0f7967be60afdc7d 100755
>>>> --- a/tools/perf/tests/shell/stat+std_output.sh
>>>> +++ b/tools/perf/tests/shell/stat+std_output.sh
>>>> @@ -13,7 +13,7 @@ stat_output=$(mktemp /tmp/__perf_test.stat_output.std.XXXXX)
>>>>
>>>>  event_name=(cpu-clock task-clock context-switches cpu-migrations page-faults stalled-cycles-frontend stalled-cycles-backend cycles instructions branches branch-misses)
>>>>  event_metric=("CPUs utilized" "CPUs utilized" "/sec" "/sec" "/sec" "frontend cycles idle" "backend cycles idle" "GHz" "insn per cycle" "/sec" "of all branches")
>>>> -skip_metric=("stalled cycles per insn" "tma_" "retiring" "frontend_bound" "bad_speculation" "backend_bound")
>>>> +skip_metric=("stalled cycles per insn" "tma_" "retiring" "frontend_bound" "bad_speculation" "backend_bound" "TopdownL1" "percent of slots")
>>>
>>> I saw similar issues and sent:
>>> https://lore.kernel.org/lkml/20240417183219.1208493-1-irogers@google.com/
>>> but got distracted. A difference there is automating the generation of
>>> the skip_metric list rather than hard coding it. Hard coding may be
>>> the most pragmatic thing to do in the near term.
>>>
>>> Thanks,
>>> Ian
>>>
>> Automating the skip_metric list generation would be great, but for
>> the time being, we can stick with hard coding until there is such
>> possibility.
> 
> Acked-by: Ian Rogers <irogers@google.com>
> 
> Thanks,
> Ian
> 
Ping on this patch. Please let me know if it's missing anything.

Thanks,
Veronika


  reply	other threads:[~2024-12-10 15:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-29 14:43 [PATCH] perf test: Parse perf stat Topdown events for aarch64 vmolnaro
2024-10-29 15:25 ` Ian Rogers
2024-11-18 10:04   ` Veronika Molnarova
2024-11-18 21:31     ` Ian Rogers
2024-12-10 15:13       ` Veronika Molnarova [this message]
2024-12-10 18:45         ` Arnaldo Carvalho de Melo

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=51789413-f4d4-4085-afeb-aedffc36c3c3@redhat.com \
    --to=vmolnaro@redhat.com \
    --cc=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.co \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=mpetlan@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tim.c.chen@linux.intel.com \
    --cc=yangyicong@hisilicon.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