From: sashiko-bot@kernel.org
To: "Matt Turner" <mattst88@gmail.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v2 1/2] perf alpha: Decode ProfileMe raw samples
Date: Fri, 30 Oct 2026 04:24:40 +0000 [thread overview]
Message-ID: <sashiko-outbox-190292@kernel.org> (raw)
In-Reply-To: <20261030-perf-alpha-profileme-v2-1-9ce2f0b0e622@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] perf alpha: missing -Wpacked suppression breaks build on 32-bit targets
--
commit 119dd432f8c77b285bd2a318dab7adc61639a02f
Author: Matt Turner <mattst88@gmail.com>
perf alpha: Decode ProfileMe raw samples
This commit decodes Alpha ProfileMe PERF_SAMPLE_RAW payloads in perf report
-D and perf script -D, and copies the UAPI header defining struct
alpha_profileme_sample into tools/arch.
> diff --git a/tools/arch/alpha/include/uapi/asm/perf_event.h b/tools/arch/alpha/include/uapi/asm/perf_event.h
> new file mode 100644
> index 0000000000000..aa0eff5a917cb
> --- /dev/null
> +++ b/tools/arch/alpha/include/uapi/asm/perf_event.h
> @@ -0,0 +1,31 @@
[ ... ]
> +#define ALPHA_PROFILEME_SAMPLE_VERSION 1
> +
> +struct alpha_profileme_sample {
> + __u32 version;
> + __u64 pmpc __attribute__((packed));
> + __u64 i_stat __attribute__((packed));
> + __u64 pctr_ctl __attribute__((packed));
> +};
> +
> +#endif /* _UAPI_ASM_ALPHA_PERF_EVENT_H */
[ ... ]
> diff --git a/tools/perf/util/alpha-sample-raw.c b/tools/perf/util/alpha-sample-raw.c
> new file mode 100644
> index 0000000000000..b4e336d8fc8f6
> --- /dev/null
> +++ b/tools/perf/util/alpha-sample-raw.c
> @@ -0,0 +1,145 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Alpha specific. Provide textual annotation for ProfileMe raw sample data.
> + */
> +
> +#include <stdio.h>
> +#include <string.h>
> +#include <linux/kernel.h>
> +#include <linux/perf_event.h>
> +
> +#include "../../arch/alpha/include/uapi/asm/perf_event.h"
[Severity: Low]
Will including this header without suppressing -Wpacked break the build on
32-bit architectures where the natural alignment of __u64 is 32 bits or less
(such as m68k, sh, arc, and microblaze)?
tools/perf/util/Build unconditionally compiles alpha-sample-raw.o on all
architectures with EXTRA_WARNINGS += -Wpacked (in
tools/scripts/Makefile.include) and CORE_CFLAGS += -Werror (in
tools/perf/Makefile.config).
In struct alpha_profileme_sample, the pmpc, i_stat, and pctr_ctl fields sit at
4-byte-aligned offsets after __u32 version and carry __attribute__((packed)),
which lowers their alignment to 1 byte. On targets where __u64 has 4-byte or
smaller alignment, those fields are already naturally aligned at offset 4, so
GCC emits a -Wpacked warning ("packed attribute causes inefficient alignment"),
failing the build under -Werror.
Should the header inclusion in tools/perf/util/alpha-sample-raw.c be wrapped in
diagnostic pragmas, similar to struct pai_data in
tools/perf/util/s390-sample-raw.c:
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpacked"
#pragma GCC diagnostic ignored "-Wattributes"
#include "../../arch/alpha/include/uapi/asm/perf_event.h"
#pragma GCC diagnostic pop
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261030-perf-alpha-profileme-v2-0-9ce2f0b0e622@gmail.com?part=1
next prev parent reply other threads:[~2026-10-30 4:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-30 4:09 [PATCH v2 0/2] perf alpha: Decode ProfileMe samples Matt Turner
2026-10-30 4:09 ` [PATCH v2 1/2] perf alpha: Decode ProfileMe raw samples Matt Turner
2026-10-30 4:24 ` sashiko-bot [this message]
2026-10-30 4:09 ` [PATCH v2 2/2] perf python: Add alpha-profileme.py Matt Turner
2026-10-30 4:13 ` 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=sashiko-outbox-190292@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mattst88@gmail.com \
--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