Clean up perf mem
Status from this message: Applied to perf-tools-next, thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest7 patches 5 repliesApplied
- v37 patches 16 repliesSuperseded
- v25 patches 24 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 6 patches | 13 replies | Superseded |
Changes in v4 from the cover letter
- Fix the powerPC building error (Kajol Jain)
- The s390 does not support perf mem. Remove the code. (Thomas)
- Add reviewed-by and tested-by from Kajol Jain for patch 1 and 2
- Add tested-by from Leo
Patches in v4 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | perf mem: Add mem_events into the supported perf_pmutools/ tools/ tools/ +7 more | +44 | 0 replies | |
| 2/7 | perf mem: Clean up perf_mem_events__ptr()tools/ tools/ tools/ +3 more | +104 | 0 replies | |
| 3/7 | perf mem: Clean up perf_mem_events__name()tools/ tools/ tools/ +7 more | +97 | 0 replies | |
| 4/7 | perf mem: Clean up perf_mem_event__supported()tools/ tools/ tools/ +2 more | +31 | 0 replies | |
| 5/7 | perf mem: Clean up is_mem_loads_aux_event()tools/ tools/ | +16 | 0 replies | |
| 6/7 | perf mem: Clean up perf_mem_events__record_args()tools/ tools/ tools/ +1 more | +17 | 1 reply | |
| 7/7 | perf mem: Clean up perf_pmus__num_mem_pmus()tools/ tools/ tools/ +4 more | +17 | 1 reply |
Reviews trailers per patch
All 7 patches have a Reviewed-by or Acked-by.
| Patch | Ian Rogers | Kajol Jain | Ravi Bangoria | Leo Yan |
|---|---|---|---|---|
| 1/7 | R-b | R-b T-b | T-b | T-b |
| 2/7 | R-b | R-b T-b | T-b | |
| 3/7 | R-b | T-b | T-b | |
| 4/7 | R-b | T-b | T-b | |
| 5/7 | R-b | T-b | T-b | |
| 6/7 | R-b | T-b | ||
| 7/7 | R-b | T-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.
Cover letter [PATCH V4 0/7] Clean up perf mem
From: Kan Liang <[email protected]>
Changes since V3:
- Fix the powerPC building error (Kajol Jain)
- The s390 does not support perf mem. Remove the code. (Thomas)
- Add reviewed-by and tested-by from Kajol Jain for patch 1 and 2
- Add tested-by from Leo
Changes since V2:
- Fix the Arm64 building error (Leo)
- Add two new patches to clean up perf_mem_events__record_args() and perf_pmus__num_mem_pmus() (Leo)
Changes since V1:
- Fix strcmp of PMU name checking (Ravi)
- Fix "/," typo (Ian)
- Rename several functions with perf_pmu__mem_events prefix. (Ian)
- Fold the header removal patch into the patch where the cleanups made. (Arnaldo)
- Add reviewed-by and tested-by from Ian and Ravi
As discussed in the below thread, the patch set is to clean up perf mem.
https://lore.kernel.org/lkml/[email protected]/
Introduce generic functions perf_mem_events__ptr(), perf_mem_events__name() ,and is_mem_loads_aux_event() to replace the ARCH specific ones.
Simplify the perf_mem_event__supported().
Only keeps the ARCH-specific perf_mem_events array in the corresponding mem-events.c for each ARCH.
There is no functional change.
The patch set touches almost all the ARCHs, Intel, AMD, ARM, Power and etc. But I can only test it on two Intel platforms.
Please give it try, if you have machines with other ARCHs.
Here are the test results:
Intel hybrid machine:
$perf mem record -e list
ldlat-loads : available
ldlat-stores : available
$perf mem record -e ldlat-loads -v --ldlat 50
calling: record -e cpu_atom/mem-loads,ldlat=50/P -e cpu_core/mem-loads,ldlat=50/P
$perf mem record -v
calling: record -e cpu_atom/mem-loads,ldlat=30/P -e cpu_atom/mem-stores/P -e cpu_core/mem-loads,ldlat=30/P -e cpu_core/mem-stores/P
$perf mem record -t store -v
calling: record -e cpu_atom/mem-stores/P -e cpu_core/mem-stores/P
Intel SPR:
$perf mem record -e list
ldlat-loads : available
ldlat-stores : available
$perf mem record -e ldlat-loads -v --ldlat 50
calling: record -e {cpu/mem-loads-aux/,cpu/mem-loads,ldlat=50/}:P
$perf mem record -v
calling: record -e {cpu/mem-loads-aux/,cpu/mem-loads,ldlat=30/}:P -e cpu/mem-stores/P
$perf mem record -t store -v
calling: record -e cpu/mem-stores/P
Kan Liang (7):
perf mem: Add mem_events into the supported perf_pmu perf mem: Clean up perf_mem_events__ptr() perf mem: Clean up perf_mem_events__name() perf mem: Clean up perf_mem_event__supported() perf mem: Clean up is_mem_loads_aux_event() perf mem: Clean up perf_mem_events__record_args() perf mem: Clean up perf_pmus__num_mem_pmus()
tools/perf/arch/arm/util/pmu.c | 3 + tools/perf/arch/arm64/util/mem-events.c | 39 +--- tools/perf/arch/arm64/util/mem-events.h | 7 + tools/perf/arch/powerpc/util/Build | 1 + tools/perf/arch/powerpc/util/mem-events.c | 16 +- tools/perf/arch/powerpc/util/mem-events.h | 7 + tools/perf/arch/powerpc/util/pmu.c | 12 ++ tools/perf/arch/x86/util/mem-events.c | 99 ++-------- tools/perf/arch/x86/util/mem-events.h | 10 + tools/perf/arch/x86/util/pmu.c | 19 +- tools/perf/builtin-c2c.c | 45 ++--- tools/perf/builtin-mem.c | 48 ++--- tools/perf/util/mem-events.c | 217 +++++++++++++--------- tools/perf/util/mem-events.h | 19 +- tools/perf/util/pmu.c | 4 +- tools/perf/util/pmu.h | 7 + tools/perf/util/pmus.c | 6 - tools/perf/util/pmus.h | 1 - 18 files changed, 279 insertions(+), 281 deletions(-) create mode 100644 tools/perf/arch/arm64/util/mem-events.h create mode 100644 tools/perf/arch/powerpc/util/mem-events.h create mode 100644 tools/perf/arch/powerpc/util/pmu.c create mode 100644 tools/perf/arch/x86/util/mem-events.h
Signature · 1 line
2.35.1