Linux Perf Users
 help / color / mirror / Atom feed
From: Jing Zhang <renyu.zj@linux.alibaba.com>
To: "Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Kan Liang <kan.liang@linux.intel.com>,
	Ian Rogers <irogers@google.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Shuai Xue <xueshuai@linux.alibaba.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] perf/x86/intel/uncore: Fix the lack of ch_mask format for SPR
Date: Mon, 30 Dec 2024 15:11:12 +0800	[thread overview]
Message-ID: <1735542672-113067-1-git-send-email-renyu.zj@linux.alibaba.com> (raw)

perf stat errors out with UNC_CHA_TOR_INSERTS.IA_HIT_CXL_ACC_LOCAL event
because of lack of ch_mask format in drivers, and perf test "104: perf
all PMU test (exclusive)" failed.

$perf stat -e perf stat -e UNC_CHA_TOR_INSERTS.IA_HIT_CXL_ACC_LOCAL
sleep 1

Initial error:
event syntax error: 'UNC_CHA_TOR_INSERTS.IA_HIT_CXL_ACC_LOCAL'
                                \___ unknown term 'ch_mask' for pmu 'uncore_cha_0'

104: perf all PMU test (exclusive)                                   : FAILED!

Add ch_mask format for SPR to fix it.

Fixes: 949b11381f81 ("perf/x86/intel/uncore: Add Sapphire Rapids server CHA support")
Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com>
---
 arch/x86/events/intel/uncore_snbep.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c
index ca98744..e537623 100644
--- a/arch/x86/events/intel/uncore_snbep.c
+++ b/arch/x86/events/intel/uncore_snbep.c
@@ -5967,6 +5967,7 @@ static int spr_cha_hw_config(struct intel_uncore_box *box, struct perf_event *ev
 	&format_attr_inv.attr,
 	&format_attr_thresh8.attr,
 	&format_attr_filter_tid5.attr,
+	&format_attr_ch_mask.attr,
 	NULL,
 };
 static const struct attribute_group spr_uncore_chabox_format_group = {
-- 
1.8.3.1


             reply	other threads:[~2024-12-30  7:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-30  7:11 Jing Zhang [this message]
2025-01-02 19:02 ` [PATCH] perf/x86/intel/uncore: Fix the lack of ch_mask format for SPR Liang, Kan
2025-01-06  2:16   ` Jing Zhang
2025-01-06 13:44     ` Liang, Kan
2025-01-07  1:55       ` Jing Zhang
2025-01-07 17:12         ` Falcon, Thomas

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=1735542672-113067-1-git-send-email-renyu.zj@linux.alibaba.com \
    --to=renyu.zj@linux.alibaba.com \
    --cc=acme@kernel.org \
    --cc=irogers@google.com \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=xueshuai@linux.alibaba.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