From: sashiko-bot@kernel.org
To: "Dapeng Mi" <dapeng1.mi@linux.intel.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [Patch v11 07/10] perf regs: Enable dumping of SIMD registers
Date: Mon, 14 Sep 2026 02:04:18 +0000 [thread overview]
Message-ID: <20260914020418.97E881F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260914014049.2061519-8-dapeng1.mi@linux.intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Missing explicit `<stdio.h>` inclusion for `printf` usage, which can cause musl build failures.
--
commit a307c3e7165562ef96094cdee1fc722a99865e02
Author: Dapeng Mi <dapeng1.mi@linux.intel.com>
perf regs: Enable dumping of SIMD registers
This commit adds support for dumping SIMD registers with the new
PERF_SAMPLE_REGS_ABI_SIMD ABI. It currently supports XMM, YMM, ZMM,
OPMASK, eGPRs, and SSP registers on x86 platforms.
> diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
> index 90d4e45f09f08..a5b596cd14be6 100644
> --- a/tools/perf/util/session.c
> +++ b/tools/perf/util/session.c
> @@ -1446,6 +1446,86 @@ static void regs_dump__printf(u64 mask, struct regs_dump *regs,
> }
> }
>
> +static void simd_regs_dump__printf(uint16_t e_machine, struct regs_dump *regs, bool intr)
> +{
> + const char *name = "unknown";
> + const char *simd_header;
> + u32 i, j, idx, pred_base;
> + uint16_t qwords;
> + int reg_c;
> +
> + if (!(regs->abi & PERF_SAMPLE_REGS_ABI_SIMD))
> + return;
> +
> + if (!regs->nr_vectors && !regs->nr_pred)
> + return;
> +
> + simd_header = "... SIMD ABI nr_vectors %" PRIu64 " vector_qwords %" PRIu64 \
> + " nr_pred %" PRIu64 " pred_qwords %" PRIu64 "\n";
> + printf(simd_header, regs->nr_vectors, regs->vector_qwords,
> + regs->nr_pred, regs->pred_qwords);
[Severity: Low]
Does this file need an explicit inclusion of <stdio.h>?
The perf tool can be compiled with musl libc, which enforces strict POSIX
namespace separation and does not implicitly include headers. Relying on
implicit header inclusion for printf() can cause build failures under musl.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260914014049.2061519-1-dapeng1.mi@linux.intel.com?part=7
next prev parent reply other threads:[~2026-09-14 2:04 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 1:40 [Patch v11 00/10] Perf tools: Support eGPRs/SSP/SIMD registers sampling Dapeng Mi
2026-09-14 1:40 ` [Patch v11 01/10] perf dwarf-regs: Fix DWARF register index bounds check Dapeng Mi
2026-09-14 1:55 ` sashiko-bot
2026-09-14 1:40 ` [Patch v11 02/10] perf util: Add missed fields in _attr__fprintf() and __attr_swap() Dapeng Mi
2026-09-14 1:53 ` sashiko-bot
2026-09-14 1:40 ` [Patch v11 03/10] tools headers: Sync x86 headers with kernel sources Dapeng Mi
2026-09-14 1:55 ` sashiko-bot
2026-09-14 3:06 ` Mi, Dapeng
2026-09-14 1:40 ` [Patch v11 04/10] perf headers: Sync perf_event.h/perf_regs.h with the kernel headers Dapeng Mi
2026-09-14 2:01 ` sashiko-bot
2026-09-14 3:23 ` Mi, Dapeng
2026-09-14 1:40 ` [Patch v11 05/10] perf regs: Support x86 eGPRs/SSP sampling Dapeng Mi
2026-09-14 2:06 ` sashiko-bot
2026-09-14 1:40 ` [Patch v11 06/10] perf regs: Support x86 SIMD registers sampling Dapeng Mi
2026-09-14 2:03 ` sashiko-bot
2026-09-14 5:14 ` Mi, Dapeng
2026-09-14 1:40 ` [Patch v11 07/10] perf regs: Enable dumping of SIMD registers Dapeng Mi
2026-09-14 2:04 ` sashiko-bot [this message]
2026-09-14 5:17 ` Mi, Dapeng
2026-09-14 18:29 ` Arnaldo Carvalho de Melo
2026-09-14 19:28 ` Arnaldo Carvalho de Melo
2026-09-14 23:56 ` Mi, Dapeng
2026-09-15 0:05 ` Arnaldo Carvalho de Melo
2026-09-14 1:40 ` [Patch v11 08/10] perf dwarf-regs: Add SIMD/eGPRs support for x86 DWARF registers Dapeng Mi
2026-09-14 1:56 ` sashiko-bot
2026-09-14 1:40 ` [Patch v11 09/10] perf tests: Add x86 eGPRs/SSP registers sampling test Dapeng Mi
2026-09-14 1:57 ` sashiko-bot
2026-09-14 1:40 ` [Patch v11 10/10] perf tests: Add SIMD " Dapeng Mi
2026-09-14 1:59 ` sashiko-bot
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=20260914020418.97E881F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=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 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.