From: sashiko-bot@kernel.org
To: "Thomas Falcon" <thomas.falcon@intel.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 3/6] perf tools: Show memory region in perf-c2c subcommand
Date: Thu, 09 Jul 2026 22:29:25 +0000 [thread overview]
Message-ID: <20260709222925.D2B5E1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260709221736.33446-4-thomas.falcon@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Missing newline character in WARN_ONCE format string.
--
--- Patch [3]: [PATCH 3/6] perf tools: Show memory region in perf-c2c subcommand ---
commit 13662f60c6b5c5739b7e7fe17ff89755ab8e651d
Author: Dapeng Mi <dapeng1.mi@linux.intel.com>
perf tools: Show memory region in perf-c2c subcommand
This commit adds a memory region field to the perf-c2c cacheline list view
to help users identify the region a cacheline belongs to. It updates the
internal structures, stats calculations, and display logic to show this
new field.
Link: https://lore.kernel.org/all/20260114011750.350569-1-dapeng1.mi@linux.intel.com/
> diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
> index c9584dbedf77a..57e822dbd2d4a 100644
> --- a/tools/perf/builtin-c2c.c
> +++ b/tools/perf/builtin-c2c.c
[ ... ]
> @@ -281,6 +282,18 @@ static void c2c_he__set_node(struct c2c_hist_entry *c2c_he,
> }
> }
>
> +static void c2c_he__set_mem_region(struct c2c_hist_entry *c2c_he,
> + unsigned int mem_region)
> +{
> + if (WARN_ONCE(mem_region > PERF_MEM_REGION_MEM7,
> + "WARNING: invalid memory region ID"))
[Severity: Low]
Does this WARN_ONCE format string need a trailing newline character?
In the perf tools environment, WARN_ONCE uses __WARN_printf, which maps
directly to fprintf(stderr, ...) without appending a newline. As a result,
when this warning is triggered, the subsequent output will be printed on the
same line, resulting in malformed terminal output.
> + return;
> +
> + /* Update mem_region only if it really accesses memory */
> + if (mem_region >= PERF_MEM_REGION_MMIO)
> + c2c_he->mem_region = mem_region;
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260709221736.33446-1-thomas.falcon@intel.com?part=3
next prev parent reply other threads:[~2026-07-09 22:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 22:17 [PATCH 0/6] perf: Add support for memory region/range reporting Thomas Falcon
2026-07-09 22:17 ` [PATCH 1/6] perf mem: Fix size tracking for mem_lvl's in perf_script__meminfo_scnprintf() Thomas Falcon
2026-07-09 22:28 ` sashiko-bot
2026-07-09 22:17 ` [PATCH 2/6] perf mem: Add support for printing PERF_MEM_LVLNUM_L0 Thomas Falcon
2026-07-09 22:17 ` [PATCH 3/6] perf tools: Show memory region in perf-c2c subcommand Thomas Falcon
2026-07-09 22:29 ` sashiko-bot [this message]
2026-07-09 22:17 ` [PATCH 4/6] perf tools: Show memory region in perf-script subcommand Thomas Falcon
2026-07-09 22:28 ` sashiko-bot
2026-07-09 22:17 ` [PATCH 5/6] perf header: Support memory ranges Thomas Falcon
2026-07-09 22:31 ` sashiko-bot
2026-07-09 22:17 ` [PATCH 6/6] perf c2c: print memory region data with stdio output Thomas Falcon
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=20260709222925.D2B5E1F000E9@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox