linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jin Yao <yao.jin@linux.intel.com>
To: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org,
	mingo@redhat.com, alexander.shishkin@linux.intel.com
Cc: Linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com,
	Jin Yao <yao.jin@linux.intel.com>
Subject: [PATCH v4 0/3] perf tool: Enable cpu list for hybrid
Date: Fri, 23 Jul 2021 14:34:30 +0800	[thread overview]
Message-ID: <20210723063433.7318-1-yao.jin@linux.intel.com> (raw)

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(-)

-- 
2.17.1


             reply	other threads:[~2021-07-23  6:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23  6:34 Jin Yao [this message]
2021-07-23  6:34 ` [PATCH v4 1/3] libperf: Add perf_cpu_map__default_new() Jin Yao
2021-07-23  6:34 ` [PATCH v4 2/3] perf tools: Create hybrid flag in target Jin Yao
2021-07-23  6:34 ` [PATCH v4 3/3] perf tools: Enable on a list of CPUs for hybrid Jin Yao
2021-08-10  0:36 ` [PATCH v4 0/3] perf tool: Enable cpu list " Jin, Yao
2021-08-11 19:01 ` Jiri Olsa
2021-08-11 19:09   ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210723063433.7318-1-yao.jin@linux.intel.com \
    --to=yao.jin@linux.intel.com \
    --cc=Linux-kernel@vger.kernel.org \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@intel.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=yao.jin@intel.com \
    --subject='Re: [PATCH v4 0/3] perf tool: Enable cpu list for hybrid' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).