All of lore.kernel.org
 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 v6 1/9] perf c2c: extract shared data structures into c2c.h
Date: Mon, 03 Aug 2026 03:58:44 +0000	[thread overview]
Message-ID: <20260803035845.591B11F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260803035220.172022-2-jiebin.sun@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The header `c2c.h` uses the POSIX libc type `int64_t` but does not explicitly include `<stdint.h>`.
--

--- Patch [1]: [PATCH v6 1/9] perf c2c: extract shared data structures into c2c.h ---
commit 0f5b8701063010839966e39a3a6a2759c7919cbf
Author: Jiebin Sun <jiebin.sun@intel.com>

perf c2c: extract shared data structures into c2c.h

This commit moves shared data structures and formatting macros from
builtin-c2c.c into a new c2c.h header file. It also exports functions
like perf_c2c__browse_cacheline(), c2c_fmt_free(), and c2c_fmt_equal()
for reuse by the upcoming function view browser.

> diff --git a/tools/perf/c2c.h b/tools/perf/c2c.h
> new file mode 100644
> index 0000000000000..aac01d4f67605
> --- /dev/null
> +++ b/tools/perf/c2c.h
> @@ -0,0 +1,149 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _PERF_C2C_H_
> +#define _PERF_C2C_H_ 1
> +
> +#include <stdbool.h>
> +#include <linux/types.h>
> +#include "util/stat.h"
> +#include "util/hist.h"
> +#include "util/mem-events.h"
> +#include "util/mem2node.h"
> +#include "util/tool.h"

[ ... ]

> +struct c2c_dimension {
> +	struct c2c_header	 header;
> +	const char		*name;
> +	int			 width;
> +	struct sort_entry	*se;
> +
> +	int64_t (*cmp)(struct perf_hpp_fmt *fmt,
> +		       struct hist_entry *left, struct hist_entry *right);

[Severity: Medium]
Will this fail to compile under musl libc? The struct c2c_dimension uses
int64_t for the cmp function pointer, but c2c.h does not explicitly include
<stdint.h>.

Since musl strictly separates declarations, relying on implicit header inclusion
can lead to build failures. Should we explicitly include <stdint.h> at the top
of this file?

> +	int   (*entry)(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp,
> +		       struct hist_entry *he);
> +	int   (*color)(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp,
> +		       struct hist_entry *he);
> +};

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

  reply	other threads:[~2026-08-03  3:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03  3:52 [PATCH v6 0/9] perf c2c: add a function view Jiebin Sun
2026-08-03  3:52 ` [PATCH v6 1/9] perf c2c: extract shared data structures into c2c.h Jiebin Sun
2026-08-03  3:58   ` sashiko-bot [this message]
2026-08-03  3:52 ` [PATCH v6 2/9] perf c2c: add function view browser skeleton Jiebin Sun
2026-08-03  3:55   ` sashiko-bot
2026-08-03  3:52 ` [PATCH v6 3/9] perf c2c: add column rendering for function view Jiebin Sun
2026-08-03  3:52 ` [PATCH v6 4/9] perf c2c: add HPP list parsing for function view columns Jiebin Sun
2026-08-03  3:52 ` [PATCH v6 5/9] perf c2c: add function view stats merge and memory management Jiebin Sun
2026-08-03  4:01   ` sashiko-bot
2026-08-03  3:52 ` [PATCH v6 6/9] perf c2c: add function view hierarchy entry creation Jiebin Sun
2026-08-03  3:52 ` [PATCH v6 7/9] perf c2c: build and finalize the function view hierarchy Jiebin Sun
2026-08-03  3:52 ` [PATCH v6 8/9] perf c2c: add function view browser UI and cacheline detail Jiebin Sun
2026-08-03  3:52 ` [PATCH v6 9/9] perf c2c: document function view in perf-c2c man page Jiebin Sun
2026-08-04 17:15 ` [PATCH v6 0/9] perf c2c: add a function view Namhyung Kim
2026-08-05  6:12   ` Jiebin Sun
2026-08-05 18:19 ` Namhyung Kim
2026-08-06  7:47   ` Jiebin Sun
2026-08-07  6:19     ` Namhyung Kim
2026-08-10  5:34       ` 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=20260803035845.591B11F000E9@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 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.