From: sashiko-bot@kernel.org
To: "Arnaldo Carvalho de Melo" <acme@kernel.org>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v2 04/11] perf annotate-data: Count flexible array accesses for the whole struct
Date: Fri, 13 Nov 2026 20:26:46 +0000 [thread overview]
Message-ID: <sashiko-outbox-213639@kernel.org> (raw)
In-Reply-To: <20261113200850.2803460-5-acme@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] perf annotate-data: missing stub for
annotated_member_extent() without libdw
--
commit 08cc9872c27cbef64cf4ff8273d106d1700fd31c
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
perf annotate-data: Count flexible array accesses for the whole struct
This commit introduces annotated_member_extent() to include children such as
flexible array members when computing the sample range of a struct or union
member in both stdio and TUI data-type annotation outputs.
> diff --git a/tools/perf/ui/browsers/annotate-data.c b/tools/perf/ui/browsers/annotate-data.c
> index 0f778788df4a9..0e1e06acf2b23 100644
> --- a/tools/perf/ui/browsers/annotate-data.c
> +++ b/tools/perf/ui/browsers/annotate-data.c
> @@ -53,12 +53,11 @@ static int get_member_overhead(struct annotated_data_type *adt,
> struct evsel *leader)
> {
> struct annotated_member *member = entry->data;
> - int i, k;
> + int i, k, end = annotated_member_extent(member);
[ ... ]
> diff --git a/tools/perf/util/annotate-data.h b/tools/perf/util/annotate-data.h
> index 184262c735621..880b11849a932 100644
> --- a/tools/perf/util/annotate-data.h
> +++ b/tools/perf/util/annotate-data.h
> @@ -260,6 +260,9 @@ void global_var_type__tree_delete(struct rb_root *root);
> /* Print data type annotation (including members) on stdout */
> int hist_entry__annotate_data_tty(struct hist_entry *he, struct evsel *evsel);
>
> +/* End offset of a member, including a flexible array's children */
> +int annotated_member_extent(struct annotated_member *member);
> +
> /* Get name of member field at the given offset in the data type */
> int annotated_data_type__get_member_name(struct annotated_data_type *adt,
> char *buf, size_t sz, int member_offset);
[Severity: Medium]
Does annotated_member_extent() need a fallback stub in the
#else /* HAVE_LIBDW_SUPPORT */ block (or to be defined outside the guard)?
This declaration sits inside #ifdef HAVE_LIBDW_SUPPORT and
tools/perf/util/annotate-data.c is only built when CONFIG_LIBDW is enabled,
whereas tools/perf/ui/browsers/annotate-data.c is built whenever
CONFIG_SLANG is enabled. Building perf with TUI enabled and libdw disabled
(e.g. make NO_LIBDW=1) fails in get_member_overhead() with an implicit
declaration and undefined reference to annotated_member_extent().
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261113200850.2803460-1-acme@kernel.org?part=4
next prev parent reply other threads:[~2026-11-13 20:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 20:08 [PATCH v2 0/11] perf coverage: A harness for perf, and the fixes it found Arnaldo Carvalho de Melo
2026-11-13 20:08 ` [PATCH v2 01/11] perf scripts: Add a coverage harness for perf Arnaldo Carvalho de Melo
2026-11-13 20:26 ` sashiko-bot
2026-11-13 20:08 ` [PATCH v2 02/11] perf annotate-data: Resolve DW_OP_addrx global variables Arnaldo Carvalho de Melo
2026-11-13 20:08 ` [PATCH v2 03/11] perf tests: Exercise the flexible array member path Arnaldo Carvalho de Melo
2026-11-13 20:25 ` sashiko-bot
2026-11-13 20:08 ` [PATCH v2 04/11] perf annotate-data: Count flexible array accesses for the whole struct Arnaldo Carvalho de Melo
2026-11-13 20:26 ` sashiko-bot [this message]
2026-11-13 20:08 ` [PATCH v2 05/11] perf tests: Exercise data type resolution from a register Arnaldo Carvalho de Melo
2026-11-13 20:26 ` sashiko-bot
2026-11-13 20:08 ` [PATCH v2 06/11] perf annotate: Print the stats after the annotations Arnaldo Carvalho de Melo
2026-11-13 20:24 ` sashiko-bot
2026-11-13 20:08 ` [PATCH v2 07/11] perf tests: Silence the libbfd probe in build-test Arnaldo Carvalho de Melo
2026-11-13 20:18 ` sashiko-bot
2026-11-13 20:08 ` [PATCH v2 08/11] perf build: Record the display-only features in FEATURE-DUMP Arnaldo Carvalho de Melo
2026-11-13 20:24 ` sashiko-bot
2026-11-13 20:08 ` [PATCH v2 09/11] perf tests: Fix the Intel PT virtual LBR check Arnaldo Carvalho de Melo
2026-11-13 20:08 ` [PATCH v2 10/11] perf test: Drop samples without an IP in the dlfilter test Arnaldo Carvalho de Melo
2026-11-13 20:26 ` sashiko-bot
2026-11-13 20:08 ` [PATCH v2 11/11] perf test: Skip the LBR inline unwinding check when unsupported Arnaldo Carvalho de Melo
2026-11-13 20:26 ` 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-213639@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=acme@kernel.org \
--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