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 v3 02/14] perf c2c: add function view browser skeleton
Date: Fri, 17 Jul 2026 02:15:47 +0000	[thread overview]
Message-ID: <20260717021547.F283B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260717020530.1645123-3-jiebin.sun@intel.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] Missing header fallback stubs for optional UI features in `tools/perf/c2c.h`
- [Low] Comment in `c2c-function.c` directly contradicts the `c2c_hist_entry` struct definition regarding per-entry state.
--

--- Patch [2]: [PATCH v3 02/14] perf c2c: add function view browser skeleton ---
commit 828f082bf7b49b53ad3bfe52de9accfa632ad4f5
Author: Jiebin Sun <jiebin.sun@intel.com>

perf c2c: add function view browser skeleton

This patch adds a skeleton for the c2c function view browser. It introduces
c2c-function.c with a stub perf_c2c__browse_function_view() entry point and
registers it in the build system.

> diff --git a/tools/perf/c2c.h b/tools/perf/c2c.h
> index 79dbd35184eda..6fc3fda40fb6c 100644
> --- a/tools/perf/c2c.h
> +++ b/tools/perf/c2c.h
> @@ -142,6 +142,7 @@ bool c2c_fmt_equal(struct perf_hpp_fmt *a, struct perf_hpp_fmt *b);
>  
>  #ifdef HAVE_SLANG_SUPPORT
>  int perf_c2c__browse_cacheline(struct hist_entry *he);
> +int perf_c2c__browse_function_view(struct hists *hists);
>  #endif

[Severity: Low]
Should this feature guard include an #else block with dummy inline stubs?
The perf tools subsystem guidelines mention that header files should provide
fallback stubs (e.g., returning -ENOTSUPP) when a feature define is absent
to prevent build failures if callers miss the #ifdef guards.

> diff --git a/tools/perf/ui/browsers/c2c-function.c b/tools/perf/ui/browsers/c2c-function.c
> new file mode 100644
> index 0000000000000..c50c8ca825c10
> --- /dev/null
> +++ b/tools/perf/ui/browsers/c2c-function.c
> @@ -0,0 +1,44 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * C2C Function Browser - function-level cacheline sharing analysis
> + *
> + * Planned UI: 3-level hierarchy showing which functions share cachelines (not implemented yet):
> + *   Level 1: Primary functions sorted by Cycles % (estimated load cycles)
> + *   Level 2: Other functions sharing cachelines with the level-1 function
> + *   Level 3: Specific shared cachelines between each pair of functions
> + *
> + * Uses c2c_hist_entry->hists to build the hierarchy without adding any
> + * per-entry state to the existing c2c data structures.
> + */

[Severity: Low]
This isn't a bug, but is this comment accurate regarding per-entry state? 
It mentions avoiding adding any per-entry state to existing data structures,
but it looks like child_stores was added to struct c2c_hist_entry
specifically for this function view.

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

  reply	other threads:[~2026-07-17  2:15 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-26  7:03 [PATCH 00/14] perf c2c: add a function view Jiebin Sun
2026-06-26  7:03 ` [PATCH 01/14] perf c2c: extract shared data structures into c2c.h Jiebin Sun
2026-06-26  7:13   ` sashiko-bot
2026-07-16 17:51     ` Namhyung Kim
2026-07-17  1:43       ` Jiebin Sun
2026-06-26  7:03 ` [PATCH 02/14] perf c2c: add function view browser skeleton Jiebin Sun
2026-06-26  7:11   ` sashiko-bot
2026-06-26  7:03 ` [PATCH 03/14] perf c2c: add function view type definitions and helpers Jiebin Sun
2026-06-26  7:14   ` sashiko-bot
2026-06-26  7:03 ` [PATCH 04/14] perf c2c: add column format infrastructure for function view Jiebin Sun
2026-06-26  7:03 ` [PATCH 05/14] perf c2c: add column entry functions " Jiebin Sun
2026-06-26  7:03 ` [PATCH 06/14] perf c2c: add comparison functions for function view sorting Jiebin Sun
2026-06-26  7:22   ` sashiko-bot
2026-06-26  7:03 ` [PATCH 07/14] perf c2c: add dimension definitions and format creation Jiebin Sun
2026-06-26  7:23   ` sashiko-bot
2026-06-26  7:03 ` [PATCH 08/14] perf c2c: add HPP list parsing for function view histograms Jiebin Sun
2026-06-26  7:16   ` sashiko-bot
2026-06-26  7:03 ` [PATCH 09/14] perf c2c: add stats merging and memory management helpers Jiebin Sun
2026-06-26  7:17   ` sashiko-bot
2026-06-26  7:03 ` [PATCH 10/14] perf c2c: add hierarchy entry creation and lookup functions Jiebin Sun
2026-06-26  7:19   ` sashiko-bot
2026-06-26  7:03 ` [PATCH 11/14] perf c2c: add function view hierarchy builder Jiebin Sun
2026-06-26  7:03 ` [PATCH 12/14] perf c2c: add function view browser UI Jiebin Sun
2026-06-26  7:03 ` [PATCH 13/14] perf c2c: add TAB key to switch to function view Jiebin Sun
2026-06-26  7:03 ` [PATCH 14/14] perf c2c: document function view in perf-c2c man page Jiebin Sun
2026-07-07  0:41 ` [PATCH 00/14] perf c2c: add a function view Namhyung Kim
2026-07-10  8:49   ` Jiebin Sun
2026-07-10 21:54     ` Namhyung Kim
2026-07-13  9:22       ` Jiebin Sun
2026-07-10  8:42 ` [PATCH v2 " Jiebin Sun
2026-07-10  8:42   ` [PATCH v2 01/14] perf c2c: extract shared data structures into c2c.h Jiebin Sun
2026-07-10  8:54     ` sashiko-bot
2026-07-10  8:42   ` [PATCH v2 02/14] perf c2c: add function view browser skeleton Jiebin Sun
2026-07-10  8:50     ` sashiko-bot
2026-07-10  8:42   ` [PATCH v2 03/14] perf c2c: add function view type definitions and helpers Jiebin Sun
2026-07-10  8:42   ` [PATCH v2 04/14] perf c2c: add column format infrastructure for function view Jiebin Sun
2026-07-10  9:00     ` sashiko-bot
2026-07-10  8:42   ` [PATCH v2 05/14] perf c2c: add column entry functions " Jiebin Sun
2026-07-10  8:42   ` [PATCH v2 06/14] perf c2c: add comparison functions for function view sorting Jiebin Sun
2026-07-10  8:42   ` [PATCH v2 07/14] perf c2c: add dimension definitions and format creation Jiebin Sun
2026-07-10  8:42   ` [PATCH v2 08/14] perf c2c: add HPP list parsing for function view histograms Jiebin Sun
2026-07-10  9:01     ` sashiko-bot
2026-07-10  8:42   ` [PATCH v2 09/14] perf c2c: add stats merging and memory management helpers Jiebin Sun
2026-07-10  8:42   ` [PATCH v2 10/14] perf c2c: add hierarchy entry creation and lookup functions Jiebin Sun
2026-07-10  8:42   ` [PATCH v2 11/14] perf c2c: add function view hierarchy builder Jiebin Sun
2026-07-10  9:01     ` sashiko-bot
2026-07-10  8:42   ` [PATCH v2 12/14] perf c2c: add function view browser UI Jiebin Sun
2026-07-10  8:42   ` [PATCH v2 13/14] perf c2c: add TAB key to switch to function view Jiebin Sun
2026-07-10  8:42   ` [PATCH v2 14/14] perf c2c: document function view in perf-c2c man page Jiebin Sun
2026-07-17  2:05   ` [PATCH v3 00/14] perf c2c: add a function view Jiebin Sun
2026-07-17  2:05     ` [PATCH v3 01/14] perf c2c: extract shared data structures into c2c.h Jiebin Sun
2026-07-17  2:14       ` sashiko-bot
2026-07-17  2:05     ` [PATCH v3 02/14] perf c2c: add function view browser skeleton Jiebin Sun
2026-07-17  2:15       ` sashiko-bot [this message]
2026-07-17  2:05     ` [PATCH v3 03/14] perf c2c: add function view type definitions and helpers Jiebin Sun
2026-07-17  2:15       ` sashiko-bot
2026-07-17  2:05     ` [PATCH v3 04/14] perf c2c: add column format infrastructure for function view Jiebin Sun
2026-07-17  2:21       ` sashiko-bot
2026-07-17  2:05     ` [PATCH v3 05/14] perf c2c: add column entry functions " Jiebin Sun
2026-07-17  2:19       ` sashiko-bot
2026-07-17  2:05     ` [PATCH v3 06/14] perf c2c: add comparison functions for function view sorting Jiebin Sun
2026-07-17  2:05     ` [PATCH v3 07/14] perf c2c: add dimension definitions and format creation Jiebin Sun
2026-07-17  2:05     ` [PATCH v3 08/14] perf c2c: add HPP list parsing for function view histograms Jiebin Sun
2026-07-17  2:22       ` sashiko-bot
2026-07-17  2:05     ` [PATCH v3 09/14] perf c2c: add stats merging and memory management helpers Jiebin Sun
2026-07-17  2:05     ` [PATCH v3 10/14] perf c2c: add hierarchy entry creation and lookup functions Jiebin Sun
2026-07-17  2:20       ` sashiko-bot
2026-07-17  2:05     ` [PATCH v3 11/14] perf c2c: add function view hierarchy builder Jiebin Sun
2026-07-17  2:05     ` [PATCH v3 12/14] perf c2c: add function view browser UI Jiebin Sun
2026-07-17  2:05     ` [PATCH v3 13/14] perf c2c: add TAB key to switch to function view Jiebin Sun
2026-07-17  2:05     ` [PATCH v3 14/14] perf c2c: document function view in perf-c2c man page Jiebin Sun

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=20260717021547.F283B1F000E9@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