Skip to content

perf tool: Enable cpu list for hybrid

Jin Yao linux-perf-users lkml 3 versions – Applied

Status from this message: Thanks, applied.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 3 repliesApplied
  2. v33 patches 6 repliesSuperseded
  3. v23 patches 1 replySuperseded

Changes in v4 from the cover letter

---
Rename evlist__use_cpu_list to evlist__fix_hybrid_cpus Add comments to evlist__fix_hybrid_cpus.

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/3libperf: Add perf_cpu_map__default_new()tools/lib/perf/cpumap.c tools/lib/perf/include/perf/cpumap.h+6 -00 replies
2/3perf tools: Create hybrid flag in targettools/perf/util/evlist.c tools/perf/util/target.h+2 -10 replies
3/3perf tools: Enable on a list of CPUs for hybridtools/perf/builtin-record.c tools/perf/builtin-stat.c tools/perf/util/evlist-hybrid.c +4 more+127 -00 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJiri Olsa
SeriesA-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/3] perf tool: Enable cpu list for hybrid

The perf-record and perf-stat have supported the option '-C/--cpus' to count or collect only on the list of CPUs provided. This option needs to be supported for hybrid as well.

v4:
---
Rename evlist__use_cpu_list to evlist__fix_hybrid_cpus Add comments to evlist__fix_hybrid_cpus.

v3:
---
Rebase to latest perf/core branch.

v2:
---
Automatically map to hybrid pmu.

For example,

If cpu0-7 are 'cpu_core' and cpu9-11 are 'cpu_atom',

  # perf stat -e cycles -C0,11 -- sleep 1
  WARNING: use 0 in 'cpu_core' for 'cycles', skip other cpus in list.
  WARNING: use 11 in 'cpu_atom' for 'cycles', skip other cpus in list.

Performance counter stats for 'CPU(s) 0,11':

           1,914,704      cpu_core/cycles/
           2,036,983      cpu_atom/cycles/

         1.005815641 seconds time elapsed

It automatically selects cpu0 for cpu_core/cycles/, selects cpu11 for cpu_atom/cycles/, also with some warnings output.

Jin Yao (3):
libperf: Add perf_cpu_map__default_new()
perf tools: Create hybrid flag in target
perf tools: Enable on a list of CPUs for hybrid

 tools/lib/perf/cpumap.c              |  5 ++
 tools/lib/perf/include/perf/cpumap.h |  1 +
 tools/perf/builtin-record.c          |  7 +++
 tools/perf/builtin-stat.c            |  6 +++
 tools/perf/util/evlist-hybrid.c      | 73 ++++++++++++++++++++++++++++
 tools/perf/util/evlist-hybrid.h      |  1 +
 tools/perf/util/evlist.c             |  3 +-
 tools/perf/util/pmu.c                | 35 +++++++++++++
 tools/perf/util/pmu.h                |  4 ++
 tools/perf/util/target.h             |  1 +
 10 files changed, 135 insertions(+), 1 deletion(-)
Signature · 1 line
2.17.1