From: Andi Kleen <ak@linux.intel.com>
To: sashiko-reviews@lists.linux.dev
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v5 4/4] perf tools: Add test for weight annotation
Date: Mon, 31 Aug 2026 11:32:16 -0700 [thread overview]
Message-ID: <apXIsKodLYUnxzLk@tassilo> (raw)
In-Reply-To: <20260830195633.BAAC31F000E9@smtp.kernel.org>
> > +# mem-loads:pu requests a precise user PEBS event whose sample weight should
> > +# be populated by -W. Unsupported PEBS/weight PMUs are skipped below.
> > +if ! perf record -W -e mem-loads:pu -o "${perfdata}" -- perf test -w thloop \
> > + > /dev/null 2> "${record_log}"; then
> > + echo "[SKIP] precise PEBS weight sampling is unavailable"
> > + exit 2
> > +fi
>
> [Severity: Medium]
> If the inner workload (perf test -w thloop) crashes or otherwise fails to
> execute, does this conditional block improperly catch the failure and report
> it as an unsupported hardware feature?
>
> It looks like any non-zero exit status from the child process will result
> in a skipped test, which might mask underlying environment or test suite bugs.
There are other tests for this, so this is acceptable.
>
> [ ... ]
> > + echo "[SKIP] PEBS weight sampling produced no nonzero weights"
> > + exit 2
> > +fi
> > +
> > +perf annotate --stdio -i "${perfdata}" --symbol "${testsym}" \
> > + > "${annotate_out}" 2> "${record_log}"
> > +
> > +grep -q 'Percent Weight' "${annotate_out}"
>
> [Severity: Medium]
> Since set -e is enabled at the top of the script, will this isolated grep
> command cause an abrupt and silent exit if the 'Percent Weight' header is
> missing from the annotation output?
>
> If the string is missing, grep will exit with code 1, which might instantly
> abort the script without printing diagnostic output, making regressions harder
> to debug.
it will exit with 1 which makes perf test fail I believe.
-Andi
next prev parent reply other threads:[~2026-08-31 18:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-30 19:34 v5 of the perf weight annotation patchkit Andi Kleen
2026-08-30 19:34 ` [PATCH v5 1/4] perf tools record: Modernize -W man page Andi Kleen
2026-08-30 19:37 ` sashiko-bot
2026-08-30 19:34 ` [PATCH v5 2/4] perf tools top: Add --weight option Andi Kleen
2026-08-30 19:43 ` sashiko-bot
2026-08-31 17:35 ` Andi Kleen
2026-08-30 19:34 ` [PATCH v5 3/4] perf tools: Add support for displaying weights in annotate Andi Kleen
2026-08-30 19:53 ` sashiko-bot
2026-08-30 19:34 ` [PATCH v5 4/4] perf tools: Add test for weight annotation Andi Kleen
2026-08-30 19:56 ` sashiko-bot
2026-08-31 18:32 ` Andi Kleen [this message]
2026-09-01 15:14 ` v5 of the perf weight annotation patchkit Namhyung Kim
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=apXIsKodLYUnxzLk@tassilo \
--to=ak@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