From: "Mi, Dapeng" <dapeng1.mi@linux.intel.com>
To: Thomas Falcon <thomas.falcon@intel.com>,
linux-perf-users@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>
Subject: Re: [PATCH v2 2/6] perf mem: Add support for printing PERF_MEM_LVLNUM_L0
Date: Wed, 15 Jul 2026 15:11:59 +0800 [thread overview]
Message-ID: <b11641d2-904b-412d-b4fd-9648799ee23e@linux.intel.com> (raw)
In-Reply-To: <20260714004359.179451-3-thomas.falcon@intel.com>
LGTM. Thanks.
Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
On 7/14/2026 8:43 AM, Thomas Falcon wrote:
> From: Dapeng Mi <dapeng1.mi@linux.intel.com>
>
> Add support for printing PERF_MEM_LVLNUM_L0 in perf mem report.
>
> Assisted-by: Sashiko:gemini-3.1-pro-preview
> Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
> Signed-off-by: Thomas Falcon <thomas.falcon@intel.com>
> ---
> tools/perf/Documentation/perf-record.txt | 2 +-
> tools/perf/util/bpf-filter.l | 1 +
> tools/perf/util/mem-events.c | 5 +++++
> tools/perf/util/mem-events.h | 1 +
> 4 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
> index 178f483140ed..b54032efe41c 100644
> --- a/tools/perf/Documentation/perf-record.txt
> +++ b/tools/perf/Documentation/perf-record.txt
> @@ -212,7 +212,7 @@ OPTIONS
> The <value> can be one of:
> <number> (for any term)
> na, load, store, pfetch, exec (for mem_op)
> - l1, l2, l3, l4, cxl, io, any_cache, lfb, ram, pmem (for mem_lvl)
> + l0, l1, l2, l3, l4, cxl, io, any_cache, lfb, ram, pmem (for mem_lvl)
> na, none, hit, miss, hitm, fwd, peer (for mem_snoop)
> remote (for mem_remote)
> na, locked (for mem_locked)
> diff --git a/tools/perf/util/bpf-filter.l b/tools/perf/util/bpf-filter.l
> index 6aa65ade3385..1be9df6550fc 100644
> --- a/tools/perf/util/bpf-filter.l
> +++ b/tools/perf/util/bpf-filter.l
> @@ -131,6 +131,7 @@ store { return constant(PERF_MEM_OP_STORE); }
> pfetch { return constant(PERF_MEM_OP_PFETCH); }
> exec { return constant(PERF_MEM_OP_EXEC); }
>
> +l0 { return constant(PERF_MEM_LVLNUM_L0); }
> l1 { return constant(PERF_MEM_LVLNUM_L1); }
> l2 { return constant(PERF_MEM_LVLNUM_L2); }
> l3 { return constant(PERF_MEM_LVLNUM_L3); }
> diff --git a/tools/perf/util/mem-events.c b/tools/perf/util/mem-events.c
> index 4e490f9cd348..4fd48fd20055 100644
> --- a/tools/perf/util/mem-events.c
> +++ b/tools/perf/util/mem-events.c
> @@ -391,6 +391,7 @@ static const char * const mem_lvlnum[] = {
> [PERF_MEM_LVLNUM_L4] = "L4",
> [PERF_MEM_LVLNUM_L2_MHB] = "L2 MHB",
> [PERF_MEM_LVLNUM_MSC] = "Memory-side Cache",
> + [PERF_MEM_LVLNUM_L0] = "L0",
> [PERF_MEM_LVLNUM_UNC] = "Uncached",
> [PERF_MEM_LVLNUM_CXL] = "CXL",
> [PERF_MEM_LVLNUM_IO] = "I/O",
> @@ -831,6 +832,8 @@ int mem_stat_index(const enum mem_stat_type mst, const u64 val)
> }
> case PERF_MEM_STAT_CACHE:
> switch (src.mem_lvl_num) {
> + case PERF_MEM_LVLNUM_L0:
> + return MEM_STAT_CACHE_L0;
> case PERF_MEM_LVLNUM_L1:
> return MEM_STAT_CACHE_L1;
> case PERF_MEM_LVLNUM_L2:
> @@ -915,6 +918,8 @@ const char *mem_stat_name(const enum mem_stat_type mst, const int idx)
> }
> case PERF_MEM_STAT_CACHE:
> switch (idx) {
> + case MEM_STAT_CACHE_L0:
> + return "L0";
> case MEM_STAT_CACHE_L1:
> return "L1";
> case MEM_STAT_CACHE_L2:
> diff --git a/tools/perf/util/mem-events.h b/tools/perf/util/mem-events.h
> index 5b98076904b0..daa22748f9fe 100644
> --- a/tools/perf/util/mem-events.h
> +++ b/tools/perf/util/mem-events.h
> @@ -109,6 +109,7 @@ enum mem_stat_op {
> };
>
> enum mem_stat_cache {
> + MEM_STAT_CACHE_L0,
> MEM_STAT_CACHE_L1,
> MEM_STAT_CACHE_L2,
> MEM_STAT_CACHE_L3,
next prev parent reply other threads:[~2026-07-15 7:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 0:43 [PATCH v2 0/6] perf: Add support for memory region/range reporting Thomas Falcon
2026-07-14 0:43 ` [PATCH v2 1/6] perf mem: Fix size tracking for mem_lvl's in perf_script__meminfo_scnprintf() Thomas Falcon
2026-07-14 0:51 ` sashiko-bot
2026-07-15 6:59 ` Mi, Dapeng
2026-07-14 0:43 ` [PATCH v2 2/6] perf mem: Add support for printing PERF_MEM_LVLNUM_L0 Thomas Falcon
2026-07-15 7:11 ` Mi, Dapeng [this message]
2026-07-14 0:43 ` [PATCH v2 3/6] perf tools: Show memory region in perf-c2c subcommand Thomas Falcon
2026-07-14 0:56 ` sashiko-bot
2026-07-14 0:43 ` [PATCH v2 4/6] perf tools: Show memory region in perf-script subcommand Thomas Falcon
2026-07-14 0:59 ` sashiko-bot
2026-07-14 0:43 ` [PATCH v2 5/6] perf header: Support memory ranges Thomas Falcon
2026-07-14 0:43 ` [PATCH v2 6/6] perf c2c: print memory region data with stdio output Thomas Falcon
2026-07-14 0:57 ` 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=b11641d2-904b-412d-b4fd-9648799ee23e@linux.intel.com \
--to=dapeng1.mi@linux.intel.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--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