linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: Jin Yao <yao.jin@linux.intel.com>, <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>,
	Kan Liang <kan.liang@linux.intel.com>
Subject: Re: [PATCH v1] perf pmu: Add PMU alias support
Date: Thu, 22 Jul 2021 11:28:23 +0100	[thread overview]
Message-ID: <ef8cc210-1a0a-796c-effa-63af590d17aa@huawei.com> (raw)
In-Reply-To: <20210722014546.11948-1-yao.jin@linux.intel.com>

On 22/07/2021 02:45, Jin Yao wrote:
> From: Kan Liang<kan.liang@linux.intel.com>
> 
> A perf uncore PMU may have two PMU names, a real name and an alias. The
> alias is exported at /sys/bus/event_source/devices/uncore_*/alias.
> The perf tool should support the alias as well.
> 
> Add alias_name in the struct perf_pmu to store the alias. For the PMU
> which doesn't have an alias. It's NULL.
> 
> Introduce two X86 specific functions to retrieve the real name and the
> alias separately.
> 
> Only go through the sysfs to retrieve the mapping between the real name
> and the alias once. The result is cached in a list, uncore_pmu_list.
> 
> Nothing changed for the other ARCHs.
> 
> With the patch, the perf tool can monitor the PMU with either the real
> name or the alias.
> 
> Use the real name,
>   $ perf stat -e uncore_cha_2/event=1/ -x,
>     4044879584,,uncore_cha_2/event=1/,2528059205,100.00,,
> 
> Use the alias,
>   $ perf stat -e uncore_type_0_2/event=1/ -x,
>     3659675336,,uncore_type_0_2/event=1/,2287306455,100.00,,

Having a self-test case would be nice. And it's questionable why this 
goes in x86 code.

Thanks,
John

  reply	other threads:[~2021-07-22 10:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22  1:45 [PATCH v1] perf pmu: Add PMU alias support Jin Yao
2021-07-22 10:28 ` John Garry [this message]
2021-07-23  6:56   ` Jin, Yao
2021-07-23 11:46     ` John Garry

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=ef8cc210-1a0a-796c-effa-63af590d17aa@huawei.com \
    --to=john.garry@huawei.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=kan.liang@linux.intel.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=yao.jin@intel.com \
    --cc=yao.jin@linux.intel.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).