perf cpumap: Refactor perf_cpu_map__merge()
Status from this message: Thanks, applied the series.
Get series with b4
b4 am [email protected]Versions newest first
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | libperf cpumap: Refactor perf_cpu_map__merge()tools/ tools/ tools/ +2 more | +40 | 1 reply | |
| 2/3 | perf cpumap: Add more tests for CPU map mergingtools/ | +29 | 1 reply | |
| 3/3 | perf cpumap: Add checking for reference countertools/ | +9 | 2 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Adrian Hunter |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/3] perf cpumap: Refactor perf_cpu_map__merge()
perf_cpu_map__merge() has two arguments, 'orig' and 'other'. The function definition might cause confusion as it could give the impression that the CPU maps in the two arguments are copied into a new allocated structure, which is then returned as the result.
This patch series refactors perf_cpu_map__merge(), makes that the first argument 'orig' as a pointer to pointer, the merged result will be updated into 'orig' rather than returning a pointer. This can be clear for the semantics that it merges 'other' into 'orig'.
The perf test has been updated for covering more cases for CPU map merging. Tested result is:
# ./perf test 41 41: CPU map : 41.1: Synthesize cpu map : Ok 41.2: Print cpu map : Ok 41.3: Merge cpu map : Ok 41.4: Intersect cpu map : Ok 41.5: Equal cpu map : Ok
Leo Yan (3):
libperf cpumap: Refactor perf_cpu_map__merge()
perf cpumap: Add more tests for CPU map merging
perf cpumap: Add checking for reference counter
tools/lib/perf/cpumap.c | 49 +++++++++++++------------ tools/lib/perf/evlist.c | 2 +- tools/lib/perf/include/perf/cpumap.h | 4 +-- tools/perf/tests/cpumap.c | 54 ++++++++++++++++++++++------ tools/perf/util/mem-events.c | 5 ++- 5 files changed, 77 insertions(+), 37 deletions(-)
Signature · 1 line
2.34.1