From: sashiko-bot@kernel.org
To: "Thomas Falcon" <thomas.falcon@intel.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v9 5/6] perf tools: Show memory region in perf-script subcommand
Date: Mon, 14 Sep 2026 22:59:47 +0000 [thread overview]
Message-ID: <20260914225947.DF3731F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260914224650.52982-6-thomas.falcon@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] perf: unnecessary session.h inclusion in mem-events.h
--
commit f3a6814df7d1c56b77a8b31b8b171d285c37db7e
Author: Dapeng Mi <dapeng1.mi@linux.intel.com>
perf tools: Show memory region in perf-script subcommand
Show the memory region in perf-script subcommand. Memory region is found
in the mem_region field of the memory information data source.
Link: https://lore.kernel.org/all/20260114011750.350569-1-dapeng1.mi@linux.intel.com/
> diff --git a/tools/perf/util/mem-events.h b/tools/perf/util/mem-events.h
> index daa22748f9fea..4ebb8109fc3c4 100644
> --- a/tools/perf/util/mem-events.h
> +++ b/tools/perf/util/mem-events.h
> @@ -4,6 +4,7 @@
>
> #include <stdbool.h>
> #include <linux/types.h>
> +#include "session.h"
[Severity: Low]
Is this full header inclusion necessary here?
Since the only usage of session.h in mem-events.h is the struct perf_session
pointer in the perf_script__meminfo_scnprintf function prototype below,
could this be replaced with a forward declaration (struct perf_session;)
instead? This would reduce namespace pollution and avoid unnecessary build
dependencies.
>
> struct perf_mem_event {
> bool supported;
[ ... ]
> @@ -47,7 +48,8 @@ int perf_mem__snp_scnprintf(char *out, size_t sz, const struct mem_info *mem_inf
> int perf_mem__lck_scnprintf(char *out, size_t sz, const struct mem_info *mem_info);
> int perf_mem__blk_scnprintf(char *out, size_t sz, const struct mem_info *mem_info);
>
> -int perf_script__meminfo_scnprintf(char *bf, size_t size, const struct mem_info *mem_info);
> +int perf_script__meminfo_scnprintf(char *bf, size_t size, const struct mem_info *mem_info,
> + struct perf_session *session);
>
> struct c2c_stats {
> u32 nr_entries;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260914224650.52982-1-thomas.falcon@intel.com?part=5
next prev parent reply other threads:[~2026-09-14 22:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 22:46 [PATCH v9 0/6] perf: Add support for memory region/range reporting Thomas Falcon
2026-09-14 22:46 ` [PATCH v9 1/6] perf mem: Fix size tracking for mem_lvl's in perf_script__meminfo_scnprintf() Thomas Falcon
2026-09-14 22:53 ` sashiko-bot
2026-09-14 22:46 ` [PATCH v9 2/6] perf mem: Add support for printing PERF_MEM_LVLNUM_L0 Thomas Falcon
2026-09-14 22:52 ` sashiko-bot
2026-09-14 22:46 ` [PATCH v9 3/6] perf header: Support memory ranges Thomas Falcon
2026-09-14 23:14 ` sashiko-bot
2026-09-14 22:46 ` [PATCH v9 4/6] perf tools: Show memory region in perf-c2c subcommand Thomas Falcon
2026-09-14 22:57 ` sashiko-bot
2026-09-15 0:07 ` Arnaldo Carvalho de Melo
2026-09-15 16:01 ` Falcon, Thomas
2026-09-15 5:11 ` Mi, Dapeng
2026-09-14 22:46 ` [PATCH v9 5/6] perf tools: Show memory region in perf-script subcommand Thomas Falcon
2026-09-14 22:59 ` sashiko-bot [this message]
2026-09-15 5:12 ` Mi, Dapeng
2026-09-14 22:46 ` [PATCH v9 6/6] perf c2c: print memory region data with stdio output Thomas Falcon
2026-09-14 22:54 ` 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=20260914225947.DF3731F000FF@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.