From: sashiko-bot@kernel.org
To: "Thomas Falcon" <thomas.falcon@intel.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v5 6/6] perf c2c: print memory region data with stdio output
Date: Fri, 21 Aug 2026 00:28:32 +0000 [thread overview]
Message-ID: <20260821002832.BD55B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260821001819.162277-7-thomas.falcon@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Missing explicit inclusion of `<stdio.h>` for `FILE` and `fprintf` usage, violating strict musl libc compilation guide.
--
--- Patch [6]: [PATCH v5 6/6] perf c2c: print memory region data with stdio output ---
commit f16f316fde0a57c797db59281b9604cd432a9c29
Author: Thomas Falcon <thomas.falcon@intel.com>
perf c2c: print memory region data with stdio output
This commit adds functionality to print memory range data in the perf-c2c
subcommand when running in stdio mode. If memory ranges are not present
or supported, it skips printing them.
> diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
> index 653b195f3c376..e774967052cca 100644
> --- a/tools/perf/builtin-c2c.c
> +++ b/tools/perf/builtin-c2c.c
> @@ -2636,6 +2636,34 @@ static void print_c2c_info(FILE *out, struct perf_session *session)
> fprintf(out, " Cacheline data grouping : %s\n", c2c.cl_sort);
> }
>
> +
> +static void print_memory_ranges_info(FILE *out, struct perf_session *session)
> +{
> + struct perf_env *env = perf_session__env(session);
> + int nr_ranges = 0;
> +
> + if (!perf_header__has_feat(&session->header, HEADER_MEMORY_RANGES))
> + return;
> + nr_ranges = env->nr_memory_ranges;
> + if (nr_ranges == 0) {
> + pr_debug("No memory ranges found, skipping\n");
> + return;
> + }
> +
> + fprintf(out, "\n");
[Severity: Low]
Does this file need an explicit include for <stdio.h>?
The new print_memory_ranges_info() function uses FILE and fprintf(). The perf
subsystem guidelines note that files using libc types or functions should
directly include the POSIX headers declaring them to prevent build failures
on musl libc systems due to strict namespace separation.
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260821001819.162277-1-thomas.falcon@intel.com?part=6
prev parent reply other threads:[~2026-08-21 0:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 0:18 [PATCH v5 0/6] perf: Add support for memory region/range reporting Thomas Falcon
2026-08-21 0:18 ` [PATCH v5 1/6] perf mem: Fix size tracking for mem_lvl's in perf_script__meminfo_scnprintf() Thomas Falcon
2026-08-21 0:29 ` sashiko-bot
2026-08-21 0:18 ` [PATCH v5 2/6] perf mem: Add support for printing PERF_MEM_LVLNUM_L0 Thomas Falcon
2026-08-21 0:27 ` sashiko-bot
2026-08-21 0:18 ` [PATCH v5 3/6] perf header: Support memory ranges Thomas Falcon
2026-08-21 0:28 ` sashiko-bot
2026-08-21 0:18 ` [PATCH v5 4/6] perf tools: Show memory region in perf-c2c subcommand Thomas Falcon
2026-08-21 0:30 ` sashiko-bot
2026-08-21 0:18 ` [PATCH v5 5/6] perf tools: Show memory region in perf-script subcommand Thomas Falcon
2026-08-21 0:32 ` sashiko-bot
2026-08-21 0:18 ` [PATCH v5 6/6] perf c2c: print memory region data with stdio output Thomas Falcon
2026-08-21 0:28 ` sashiko-bot [this message]
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=20260821002832.BD55B1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=thomas.falcon@intel.com \
/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.