Linux Perf Users
 help / color / mirror / Atom feed
From: "Mi, Dapeng" <dapeng1.mi@linux.intel.com>
To: sashiko-reviews@lists.linux.dev
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [Patch v9 09/10] perf tests: Add x86 eGPRs/SSP registers sampling test
Date: Wed, 8 Jul 2026 10:30:07 +0800	[thread overview]
Message-ID: <a9ad6d88-f693-48f2-84b5-8c76eabd0a75@linux.intel.com> (raw)
In-Reply-To: <20260706030025.4A6731F000E9@smtp.kernel.org>


On 7/6/2026 11:00 AM, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] The validation function `validate_gp_reg_sampling` executes a single hardcoded `perf record` pipeline instead of using the standard `perf_record_with_retry` helper, leading to test flakiness and untraceable failures.
> --
>
> commit 5bc6b87aa83194eef4aff3394561f1bdb19039e4
> Author: Dapeng Mi <dapeng1.mi@linux.intel.com>
>
> perf tests: Add x86 eGPRs/SSP registers sampling test
>
> Validate that eGPRs (extended general purpose registers) and SSP
> (shadow stack pointer) registers can be sampled correctly on x86
> platforms with hardware support.
>
>> diff --git a/tools/perf/tests/shell/record.sh b/tools/perf/tests/shell/record.sh
>> index dd90fef2088b1..48c722e563e27 100755
>> --- a/tools/perf/tests/shell/record.sh
>> +++ b/tools/perf/tests/shell/record.sh
> [ ... ]
>
>> @@ -131,6 +131,131 @@ check_system_wide() {
>> +validate_gp_reg_sampling() {
>> +  local regs_opt="$1"
>> +  local regs_value="$2"
>> +  local script_field="$3"
>> +  local sample_output
>> +  shift 3
>> +
>> +  if ! sample_output=$(perf record -o - "${regs_opt}=${regs_value}" \
>> +    -e br_inst_retired.near_call -c 1000 --per-thread ${testprog} 2> /dev/null \
>> +    | perf script -F ip,sym,"${script_field}" -i - 2> /dev/null)
> [Severity: Medium]
> Could this hardcoded perf record pipeline lead to test flakiness on slower
> environments?
>
> By not using the standard perf_record_with_retry helper, a single execution
> might fail to generate the 1000 near calls required to trigger a hardware
> sample.
>
> Additionally, does suppressing stderr with 2> /dev/null permanently hide
> error details from the CI pipelines by bypassing the PERF_RECORD_LOGS
> collection mechanism?

This comment seems a false positive. There is no perf_record_with_retry
helper in kernel code base.


>
>> +  then
>> +    return 1
>> +  fi
>> +
>> +  if ! has_required_regs "${sample_output}" "$@"
>> +  then
>> +    return 1
>> +  fi
>> +
>> +  return 0
>> +}

  reply	other threads:[~2026-07-08  2:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-06  2:34 [Patch v9 00/10] Perf tools: Support eGPRs/SSP/SIMD registers sampling Dapeng Mi
2026-07-06  2:34 ` [Patch v9 01/10] perf dwarf-regs: Fix DWARF register index bounds check Dapeng Mi
2026-07-06  2:34 ` [Patch v9 02/10] perf util: Add missed fields in _attr__fprintf() and __attr_swap() Dapeng Mi
2026-07-06  2:34 ` [Patch v9 03/10] tools headers: Sync x86 headers with kernel sources Dapeng Mi
2026-07-06  2:54   ` sashiko-bot
2026-07-08  2:05     ` Mi, Dapeng
2026-07-06  2:34 ` [Patch v9 04/10] perf headers: Sync perf_event.h/perf_regs.h with the kernel headers Dapeng Mi
2026-07-06  2:34 ` [Patch v9 05/10] perf regs: Support x86 eGPRs/SSP sampling Dapeng Mi
2026-07-06  2:59   ` sashiko-bot
2026-07-08  2:15     ` Mi, Dapeng
2026-07-06  2:34 ` [Patch v9 06/10] perf regs: Support x86 SIMD registers sampling Dapeng Mi
2026-07-06  2:34 ` [Patch v9 07/10] perf regs: Enable dumping of SIMD registers Dapeng Mi
2026-07-06  2:55   ` sashiko-bot
2026-07-08  2:21     ` Mi, Dapeng
2026-07-06  2:34 ` [Patch v9 08/10] perf dwarf-regs: Add SIMD/eGPRs support for x86 DWARF registers Dapeng Mi
2026-07-06  2:34 ` [Patch v9 09/10] perf tests: Add x86 eGPRs/SSP registers sampling test Dapeng Mi
2026-07-06  3:00   ` sashiko-bot
2026-07-08  2:30     ` Mi, Dapeng [this message]
2026-07-06  2:34 ` [Patch v9 10/10] perf tests: Add SIMD " Dapeng Mi

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=a9ad6d88-f693-48f2-84b5-8c76eabd0a75@linux.intel.com \
    --to=dapeng1.mi@linux.intel.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sashiko-reviews@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox