mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Liang, Kan" <kan.liang@linux.intel.com>
To: Stephane Eranian <eranian@google.com>, linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, kan.liang@intel.com, ak@linux.intel.com,
	namhyung@kernel.org, irogers@google.com
Subject: Re: [PATCH] perf/x86/intel/uncore: add events for Intel SPR IMC PMU
Date: Thu, 20 Apr 2023 09:03:55 -0400	[thread overview]
Message-ID: <0e1a27ca-8288-cbff-b903-0bb4f605bf84@linux.intel.com> (raw)
In-Reply-To: <20230419214241.2310385-1-eranian@google.com>



On 2023-04-19 5:42 p.m., Stephane Eranian wrote:
> Add missing clockticks and cas_count_* events for Intel SapphireRapids IMC
> PMU. These events are useful to measure memory bandwidth.
> 
> Signed-off-by: Stephane Eranian <eranian@google.com>

Reviewed-by: Kan Liang <kan.liang@linux.intel.com>

Thanks,
Kan

> ---
>  arch/x86/events/intel/uncore_snbep.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c
> index 7d1199554fe3..fa9b209a11fa 100644
> --- a/arch/x86/events/intel/uncore_snbep.c
> +++ b/arch/x86/events/intel/uncore_snbep.c
> @@ -6068,6 +6068,17 @@ static struct intel_uncore_ops spr_uncore_mmio_ops = {
>  	.read_counter		= uncore_mmio_read_counter,
>  };
>  
> +static struct uncore_event_desc spr_uncore_imc_events[] = {
> +	INTEL_UNCORE_EVENT_DESC(clockticks,      "event=0x01,umask=0x00"),
> +	INTEL_UNCORE_EVENT_DESC(cas_count_read,  "event=0x05,umask=0xcf"),
> +	INTEL_UNCORE_EVENT_DESC(cas_count_read.scale, "6.103515625e-5"),
> +	INTEL_UNCORE_EVENT_DESC(cas_count_read.unit, "MiB"),
> +	INTEL_UNCORE_EVENT_DESC(cas_count_write, "event=0x05,umask=0xf0"),
> +	INTEL_UNCORE_EVENT_DESC(cas_count_write.scale, "6.103515625e-5"),
> +	INTEL_UNCORE_EVENT_DESC(cas_count_write.unit, "MiB"),
> +	{ /* end: all zeroes */ },
> +};
> +
>  static struct intel_uncore_type spr_uncore_imc = {
>  	SPR_UNCORE_COMMON_FORMAT(),
>  	.name			= "imc",
> @@ -6075,6 +6086,7 @@ static struct intel_uncore_type spr_uncore_imc = {
>  	.fixed_ctr		= SNR_IMC_MMIO_PMON_FIXED_CTR,
>  	.fixed_ctl		= SNR_IMC_MMIO_PMON_FIXED_CTL,
>  	.ops			= &spr_uncore_mmio_ops,
> +	.event_descs		= spr_uncore_imc_events,
>  };
>  
>  static void spr_uncore_pci_enable_event(struct intel_uncore_box *box,

  reply	other threads:[~2023-04-20 13:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-19 21:42 Stephane Eranian
2023-04-20 13:03 ` Liang, Kan [this message]
2023-04-22  7:50 ` [tip: perf/core] perf/x86/intel/uncore: Add " tip-bot2 for Stephane Eranian

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=0e1a27ca-8288-cbff-b903-0bb4f605bf84@linux.intel.com \
    --to=kan.liang@linux.intel.com \
    --cc=ak@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /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

all inboxes | Powered by JetHome®