Linux Perf Users
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jiebin Sun" <jiebin.sun@intel.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v9 2/9] perf c2c: add function view model skeleton
Date: Mon, 17 Aug 2026 09:48:47 +0000	[thread overview]
Message-ID: <20260817094847.73D3B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260817094623.3288456-3-jiebin.sun@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] symbol_name_equal() uses host-architecture logic for cross-platform analysis.
--

--- Patch [2]: [PATCH v9 2/9] perf c2c: add function view model skeleton ---
commit 4a0efb41e4b472e806fe1942f44d90ab0a7857c6
Author: Jiebin Sun <jiebin.sun@intel.com>
    
perf c2c: add function view model skeleton

This commit adds the initial common model for the c2c function view. It
introduces model state and small helpers shared by hierarchy construction
and formatting, building the model independently from util/.

> diff --git a/tools/perf/util/c2c-function.c b/tools/perf/util/c2c-function.c
> new file mode 100644
> index 0000000000000..ca82425a28dc3
> --- /dev/null
> +++ b/tools/perf/util/c2c-function.c

[ ... ]

> +static inline __maybe_unused bool symbol_name_equal(struct symbol *a, struct symbol *b)
> +{
> +	/* Two unknown symbols compare equal, matching cmp_null() in util/sort.c. */
> +	if (!a || !b)
> +		return a == b;
> +	return arch__compare_symbol_names(a->name, b->name) == 0;

[Severity: Medium]
Does this break cross-platform analysis?

Calling arch__compare_symbol_names() delegates symbol comparison to a
host-specific weak function rather than checking the target architecture.

If someone analyzes a perf.data file recorded on a different architecture
(like PowerPC) on an x86 host using perf c2c, could this lead to incorrect
symbol matching and inaccurate profiling reports because functions fail to
coalesce properly?

Would it be safer to query the e_machine constant dynamically via the
perf_env or session to handle architectural variations here?

> +}
> +

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260817094623.3288456-1-jiebin.sun@intel.com?part=2

  reply	other threads:[~2026-08-17  9:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17  9:46 [PATCH v9 0/9] perf c2c: add a function view Jiebin Sun
2026-08-17  9:46 ` [PATCH v9 1/9] perf c2c: extract shared data structures into util/c2c.h Jiebin Sun
2026-08-17  9:59   ` sashiko-bot
2026-08-17  9:46 ` [PATCH v9 2/9] perf c2c: add function view model skeleton Jiebin Sun
2026-08-17  9:48   ` sashiko-bot [this message]
2026-08-17  9:46 ` [PATCH v9 3/9] perf c2c: add column rendering for function view Jiebin Sun
2026-08-17  9:49   ` sashiko-bot
2026-08-17  9:46 ` [PATCH v9 4/9] perf c2c: add HPP list parsing for function view columns Jiebin Sun
2026-08-17  9:50   ` sashiko-bot
2026-08-17  9:46 ` [PATCH v9 5/9] perf c2c: add function view stats merge and memory management Jiebin Sun
2026-08-17  9:49   ` sashiko-bot
2026-08-17  9:46 ` [PATCH v9 6/9] perf c2c: add function view hierarchy entry creation Jiebin Sun
2026-08-17  9:49   ` sashiko-bot
2026-08-17  9:46 ` [PATCH v9 7/9] perf c2c: build and finalize the function view hierarchy Jiebin Sun
2026-08-17  9:54   ` sashiko-bot
2026-08-17  9:46 ` [PATCH v9 8/9] perf c2c: add function view browser UI and cacheline detail Jiebin Sun
2026-08-17  9:51   ` sashiko-bot
2026-08-17  9:46 ` [PATCH v9 9/9] perf c2c: document function view in perf-c2c man page Jiebin Sun
2026-08-17  9:49   ` 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=20260817094847.73D3B1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=jiebin.sun@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