Linux Perf Users
 help / color / mirror / Atom feed
From: "Falcon, Thomas" <thomas.falcon@intel.com>
To: "namhyung@kernel.org" <namhyung@kernel.org>
Cc: "james.clark@linaro.org" <james.clark@linaro.org>,
	"alexander.shishkin@linux.intel.com"
	<alexander.shishkin@linux.intel.com>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"linux-perf-users@vger.kernel.org"
	<linux-perf-users@vger.kernel.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"acme@kernel.org" <acme@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jolsa@kernel.org" <jolsa@kernel.org>,
	"dapeng1.mi@linux.intel.com" <dapeng1.mi@linux.intel.com>,
	"Rogers, Ian" <irogers@google.com>,
	"Hunter, Adrian" <adrian.hunter@intel.com>
Subject: Re: [PATCH v5 0/6] perf: Add support for memory region/range reporting
Date: Mon, 31 Aug 2026 17:48:23 +0000	[thread overview]
Message-ID: <fca9b9654a71ddeeebd8cf05e62a38c2b5cc0762.camel@intel.com> (raw)
In-Reply-To: <apNCR_EvfWuIfhdg@google.com>

On Sat, 2026-08-29 at 13:34 -0700, Namhyung Kim wrote:
> Hello,
> 
> On Thu, Aug 20, 2026 at 07:18:13PM -0500, Thomas Falcon wrote:
> > Add support for two memory-related reporting features in the perf tool:
> > 
> > 1. Memory region reporting in perf-c2c and perf-script subcommands.
> > 2. Memory range data in perf.data file header and perf-c2c subcommand.
> > 
> > Memory region reporting was introduced as part of support for the
> > Off-module Response facility (OMR) [1], which provides a new data
> > source encoding supporting "up to 8 fine-grained memory regions in
> > addition to the cache region, offering more detailed insights into
> > memory access regions."
> > 
> > Memory Range support was introduced with the addition of the ACPI Memory
> > Range and Region Mapping (MRRM) [2] table. It provides a base address plus
> > a length value for each memory range, as well as NUMA node and local and
> > remote "region ID's" so that "platform firmware can indicate the type of
> > memory for each range."[3]
> > 
> > Include a change allowing PERF_MEM_LVLNUM_L0 to be printed in
> > perf-mem output as well.
> > 
> > [1]: https://lore.kernel.org/all/20260114011750.350569-1-dapeng1.mi@linux.intel.com/
> > [2]: https://lore.kernel.org/lkml/20250505173819.419271-1-tony.luck@intel.com/
> > [3]: MRRM definition allow for future expansion for the OS to assign
> > these region IDs.
> 
> Thank you for doing this.  Unfortunately it conflicts with Jiebin's perf
> c2c function view support patchset.  As there's an update, can you please
> wait a little more and rebase onto the latest perf-tools-next?

No problem, I will send a new rebased version soon.

Thanks,
Tom

> 
> Thanks,
> Namhyung
> 
> > 
> > v5:
> > -- perf-c2c: make the cacheline header span and ui_quirks() width
> >    fixup depend on memory-region availability (Namhyung Kim)
> > 
> > v4:
> > -- perf-script: gate the Region field on the HEADER_MEMORY_RANGES feature
> >    bit via perf_session instead of a global flag, with a pipe-mode fallback
> > -- perf-c2c: fix output_str allocation error handling
> > -- perf header: Fix typo in region id bounds checking which made region 255
> >    invalid
> > 
> > v3:
> > -- included missing ff-size check in process_memory_ranges
> > -- make memory region reporting in perf c2c-and perf-script conditional
> >    on feature bit, requiring some patch reordering (Namhyung Kim)
> > -- used open/openat to read memory range sysfs files in memory_range__read()
> >    (Namhyung Kim)
> > -- Removed path name and file name buffers in memory_range__read(),
> >    instead pass path name from as a parameter from memory_range__parse()
> >    (Namhyung Kim)
> > -- use calloc instead of zalloc in memory_range__parse() and
> >    process_memory_ranges() (Namhyung Kim)
> > -- Removed redundant check for existance of memory range directory in
> >    memory_range__read() (Namhyung Kim)
> > -- Included output examples of memory ranges in perf header and perf-c2c
> >    in commit message (Namhyung Kim)
> > 
> > v2:
> > -- Added missing newline in WARN_ONCE message in c2c_he__set_mem_region()
> > -- increased buffers passed to perf_script__meminfo_scnprintf() from 150
> >    to 200 bytes to avoid silent truncation
> > -- Added check for NULL return of sysfs__mountpoint() when parsing
> >    memory ranges in sysfs
> > -- increased MAX_MEMORY_RANGES sanity check from 64 to 256 based on
> >    ACPI MRRM table implementation in Linux kernel
> > -- added comment for MAX_MEMORY_RANGES to clarify that it is a sanity check
> >    for malformed perf.data files
> > -- removed a line of code was removed from util/env.h but was added back in
> >    v1 due to bad rebase
> > 
> > Dapeng Mi (3):
> >   perf mem: Add support for printing PERF_MEM_LVLNUM_L0
> >   perf tools: Show memory region in perf-c2c subcommand
> >   perf tools: Show memory region in perf-script subcommand
> > 
> > Thomas Falcon (3):
> >   perf mem: Fix size tracking for mem_lvl's in
> >     perf_script__meminfo_scnprintf()
> >   perf header: Support memory ranges
> >   perf c2c: print memory region data with stdio output
> > 
> >  tools/perf/Documentation/perf-record.txt      |   2 +-
> >  .../Documentation/perf.data-file-format.txt   |  13 ++
> >  tools/perf/builtin-c2c.c                      | 125 ++++++++++-
> >  tools/perf/builtin-inject.c                   |   1 +
> >  tools/perf/builtin-script.c                   |  13 +-
> >  tools/perf/util/bpf-filter.l                  |   1 +
> >  tools/perf/util/env.c                         |   1 +
> >  tools/perf/util/env.h                         |  10 +
> >  tools/perf/util/header.c                      | 203 ++++++++++++++++++
> >  tools/perf/util/header.h                      |   1 +
> >  tools/perf/util/mem-events.c                  |  93 +++++++-
> >  tools/perf/util/mem-events.h                  |   5 +-
> >  .../scripting-engines/trace-event-python.c    |   5 +-
> >  13 files changed, 452 insertions(+), 21 deletions(-)
> > 
> > -- 
> > 2.55.0
> > 
> 


      reply	other threads:[~2026-08-31 17:48 UTC|newest]

Thread overview: 15+ 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
2026-08-29 20:34 ` [PATCH v5 0/6] perf: Add support for memory region/range reporting Namhyung Kim
2026-08-31 17:48   ` Falcon, Thomas [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=fca9b9654a71ddeeebd8cf05e62a38c2b5cc0762.camel@intel.com \
    --to=thomas.falcon@intel.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=dapeng1.mi@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 \
    /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