Skip to content

Add the page size in the perf record (user tools)

[email protected] lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest6 patches 6 repliesIn review
  2. v39 patches 4 repliesSuperseded
  3. v212 patches 10 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v112 patches3 repliesSuperseded

Changes in v4 from the cover letter

- Rebase on top of acme's perf/core branch
commit c07b45a355ee ("perf record: Tweak "Lowering..." warning in record_opts__config_freq")

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6perf mem: Clean up output formattools/perf/builtin-mem.c+38 -550 replies
2/6perf mem: Support data page sizetools/perf/Documentation/perf-mem.txt tools/perf/builtin-mem.c+22 -10 replies
3/6perf tools: Add support for PERF_SAMPLE_CODE_PAGE_SIZEtools/perf/Documentation/perf-record.txt tools/perf/builtin-record.c tools/perf/util/event.h +5 more+34 -20 replies
4/6perf script: Add support for PERF_SAMPLE_CODE_PAGE_SIZEtools/perf/Documentation/perf-script.txt tools/perf/builtin-script.c tools/perf/util/session.c+15 -32 replies
5/6perf report: Add support for PERF_SAMPLE_CODE_PAGE_SIZEtools/perf/Documentation/perf-report.txt tools/perf/util/hist.c tools/perf/util/hist.h +2 more+32 -01 reply
6/6perf test: Add test case for PERF_SAMPLE_CODE_PAGE_SIZEtools/perf/tests/sample-parsing.c+4 -00 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchNamhyung KimJiri OlsaStephane EranianAthira Rajeev
SeriesT-b
1/6A-b A-b
2/6A-b A-b
3/6A-b A-b Originally-by
4/6A-b A-b
5/6A-b A-b
6/6A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v4 thread

Cover letter [PATCH V4 0/6] Add the page size in the perf record (user tools)

From: Kan Liang <[email protected]>

Changes since V3:
- Rebase on top of acme's perf/core branch
commit c07b45a355ee ("perf record: Tweak "Lowering..." warning in record_opts__config_freq")

Changes since V2:
- Rebase on top of acme perf/core branch
commit eec7b53d5916 ("perf test: Make sample-parsing test aware of PERF_SAMPLE_{CODE,DATA}_PAGE_SIZE")
- Use unit_number__scnprintf() in get_page_size_name()
- Emit warning about kernel not supporting the code page size sample_type bit

Changes since V1:
- Fix the compile warning with GCC 10
- Add Acked-by from Namhyung Kim

Current perf can report both virtual addresses and physical addresses, but not the page size. Without the page size information of the utilized page, users cannot decide whether to promote/demote large pages to optimize memory usage.

The kernel patches have been merged into tip perf/core branch, commit 8d97e71811aa ("perf/core: Add PERF_SAMPLE_DATA_PAGE_SIZE") commit 76a5433f95f3 ("perf/x86/intel: Support PERF_SAMPLE_DATA_PAGE_SIZE") commit 4cb6a42e4c4b ("powerpc/perf: Support PERF_SAMPLE_DATA_PAGE_SIZE") commit 995f088efebe ("perf/core: Add support for PERF_SAMPLE_CODE_PAGE_SIZE") commit 51b646b2d9f8 ("perf,mm: Handle non-page-table-aligned hugetlbfs")

and Peter's perf/core branch
commit 524680ce47a1 ("mm/gup: Provide gup_get_pte() more generic") commit 44a35d6937d2 ("mm: Introduce pXX_leaf_size()") commit 2f1e2f091ad0 ("perf/core: Fix arch_perf_get_page_size()") commit 7649e44aacdd ("arm64/mm: Implement pXX_leaf_size() support") commit 1df1ae7e262c ("sparc64/mm: Implement pXX_leaf_size() support")

This patch set is to enable the page size support in user tools.

Kan Liang (3):
perf mem: Clean up output format
perf mem: Support data page size
perf tools: Add support for PERF_SAMPLE_CODE_PAGE_SIZE

Stephane Eranian (3):
perf script: Add support for PERF_SAMPLE_CODE_PAGE_SIZE perf report: Add support for PERF_SAMPLE_CODE_PAGE_SIZE perf test: Add test case for PERF_SAMPLE_CODE_PAGE_SIZE

 tools/perf/Documentation/perf-mem.txt     |   3 +
 tools/perf/Documentation/perf-record.txt  |   3 +
 tools/perf/Documentation/perf-report.txt  |   1 +
 tools/perf/Documentation/perf-script.txt  |   2 +-
 tools/perf/builtin-mem.c                  | 111 +++++++++++-----------
 tools/perf/builtin-record.c               |   2 +
 tools/perf/builtin-script.c               |  13 ++-
 tools/perf/tests/sample-parsing.c         |   4 +
 tools/perf/util/event.h                   |   1 +
 tools/perf/util/evsel.c                   |  18 +++-
 tools/perf/util/evsel.h                   |   1 +
 tools/perf/util/hist.c                    |   2 +
 tools/perf/util/hist.h                    |   1 +
 tools/perf/util/perf_event_attr_fprintf.c |   2 +-
 tools/perf/util/record.h                  |   1 +
 tools/perf/util/session.c                 |   3 +
 tools/perf/util/sort.c                    |  26 +++++
 tools/perf/util/sort.h                    |   2 +
 tools/perf/util/synthetic-events.c        |   8 ++
 19 files changed, 144 insertions(+), 60 deletions(-)
Signature · 1 line
2.25.1