linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] perf tool: Enable cpu list for hybrid
@ 2021-07-12  7:12 Jin Yao
  2021-07-12  7:12 ` [PATCH v3 1/3] libperf: Add perf_cpu_map__default_new() Jin Yao
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Jin Yao @ 2021-07-12  7:12 UTC (permalink / raw)
  To: acme, jolsa, peterz, mingo, alexander.shishkin
  Cc: Linux-kernel, ak, kan.liang, yao.jin, Jin Yao

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.

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      | 65 ++++++++++++++++++++++++++++
 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, 127 insertions(+), 1 deletion(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-07-23  0:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12  7:12 [PATCH v3 0/3] perf tool: Enable cpu list for hybrid Jin Yao
2021-07-12  7:12 ` [PATCH v3 1/3] libperf: Add perf_cpu_map__default_new() Jin Yao
2021-07-12  7:12 ` [PATCH v3 2/3] perf tools: Create hybrid flag in target Jin Yao
2021-07-12  7:12 ` [PATCH v3 3/3] perf tools: Enable on a list of CPUs for hybrid Jin Yao
2021-07-19 19:36   ` Jiri Olsa
2021-07-20  7:07     ` Jin, Yao
2021-07-20  9:16       ` Jiri Olsa
2021-07-21  4:30         ` Jin, Yao
2021-07-22 10:19           ` Jiri Olsa
2021-07-23  0:49             ` Jin, Yao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).