All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mi, Dapeng" <dapeng1.mi@linux.intel.com>
To: sashiko@lists.linux.dev
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [Patch v2] perf tests: Add auto counter reload (ACR) sampling test
Date: Mon, 20 Apr 2026 14:35:36 +0800	[thread overview]
Message-ID: <339de842-c00c-4b99-8a1b-1473c644d29e@linux.intel.com> (raw)
In-Reply-To: <20260420031020.CFDE8C2BCAF@smtp.kernel.org>


On 4/20/2026 11:10 AM, sashiko-bot@kernel.org wrote:
> Sashiko AI review found 1 potential issue(s):
> - [Medium] Early return in the PEBS support check unintentionally skips subsequent ratio-to-prev tests and the final success message.
> --
>
> commit 4863d01ec678cdb7aeb26a69a3ff812dd0a8e16c
> Author: Dapeng Mi <dapeng1.mi@linux.intel.com>
>
> perf tests: Add auto counter reload (ACR) sampling test
>
> This commit adds an auto counter reload sampling test to verify that the
> intended event records can be captured and that self-reloaded events
> won't generate any records.
>
>> diff --git a/tools/perf/tests/shell/record.sh b/tools/perf/tests/shell/record.sh
>> index 7cb81cf3444a7..a05b0c8b6d6b6 100755
>> --- a/tools/perf/tests/shell/record.sh
>> +++ b/tools/perf/tests/shell/record.sh
>> @@ -402,6 +402,94 @@ test_callgraph() {
> [ ... ]
>
>> +  if ! perf record -o "${perfdata}" -e "${pebs_events}" ${testprog} 2> /dev/null
>> +  then
>> +    echo "Auto counter reload PEBS sampling [Skipped not supported]"
>> +    return
>> +  fi
> If PEBS is not supported, this early return exits the entire function. Does
> this unintentionally skip the subsequent ratio-to-prev tests and prevent the
> script from printing the final "Auto counter reload sampling [Success]"
> message?
>
> The ratio-to-prev tests use the u modifier rather than the p modifier, so it
> appears they should be allowed to run even if PEBS is not supported.

Hmm, maybe It's a better choice to integrate the ratio_prev_test sampling
test into the test_ratio_to_prev case. Thanks.


>
>> +  if ! perf script -i "${perfdata}" -F event | grep -q "instructions"
>> +  then
>> +    echo "Auto counter reload PEBS sampling [Failed missing instructions event]"
>> +    err=1
>> +    return
>> +  fi

      reply	other threads:[~2026-04-20  6:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-20  2:55 [Patch v2] perf tests: Add auto counter reload (ACR) sampling test Dapeng Mi
2026-04-20  3:10 ` sashiko-bot
2026-04-20  6:35   ` Mi, Dapeng [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=339de842-c00c-4b99-8a1b-1473c644d29e@linux.intel.com \
    --to=dapeng1.mi@linux.intel.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sashiko@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.