diff options
| author | Ian Rogers <irogers@google.com> | 2026-09-25 23:19:44 -0700 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-09-26 20:49:28 +0200 |
| commit | 6ceccefad0751966ec63713e2855095caf296c54 (patch) | |
| tree | 68ab680e260e653069d0579130eb2e4316b2ba0e /tools/perf/python/stackcollapse.py | |
| parent | 4425182d426b2180e98d0b537f46cdb03078876d (diff) | |
| download | linux-next-6ceccefad0751966ec63713e2855095caf296c54.tar.gz linux-next-6ceccefad0751966ec63713e2855095caf296c54.zip | |
perf python: Port mem-phys-addr to perf module
Port mem-phys-addr.py to a standalone script in tools/perf/python/
using the perf.session API to read perf.data files and profile physical
memory access types against /proc/iomem.
Improvements compared to the legacy script:
- Parse the full indentation hierarchy of /proc/iomem into a parent-child
tree of frozen IomemEntry dataclasses (instead of only top-level
indent-0 ranges), resolving physical addresses to the most specific
sub-range (such as Kernel code/data/bss inside System RAM) and rolling
child counts up into parent totals.
- Support profiling multiple memory events in a single perf.data session
(keyed by evsel name) instead of assuming a single global event.
- Add argparse CLI options (-i/--input and --iomem to allow supplying an
offline /proc/iomem snapshot from a target system).
Add a shell test (test_mem_phys_addr_python.sh) to verify the standalone
script.
Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
