From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Clark Williams <williams@redhat.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Borislav Petkov <bp@suse.de>,
Peter Zijlstra <peterz@infradead.org>
Subject: [PATCH 04/26] tools arch x86: Sync the msr-index.h copy with the kernel sources
Date: Mon, 13 Apr 2020 13:51:41 -0300 [thread overview]
Message-ID: <20200413165203.1816-5-acme@kernel.org> (raw)
In-Reply-To: <20200413165203.1816-1-acme@kernel.org>
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To pick up the changes in:
6650cdd9a8cc ("x86/split_lock: Enable split lock detection by kernel")
Warning: Kernel ABI header at 'tools/arch/x86/include/asm/msr-index.h' differs from latest version at 'arch/x86/include/asm/msr-index.h'
diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h
Which causes these changes in tooling:
$ tools/perf/trace/beauty/tracepoints/x86_msr.sh > before
$ cp arch/x86/include/asm/msr-index.h tools/arch/x86/include/asm/msr-index.h
$ tools/perf/trace/beauty/tracepoints/x86_msr.sh > after
$ diff -u before after
--- before 2020-04-01 12:11:14.789344795 -0300
+++ after 2020-04-01 12:11:56.907798879 -0300
@@ -10,6 +10,7 @@
[0x00000029] = "KNC_EVNTSEL1",
[0x0000002a] = "IA32_EBL_CR_POWERON",
[0x0000002c] = "EBC_FREQUENCY_ID",
+ [0x00000033] = "TEST_CTRL",
[0x00000034] = "SMI_COUNT",
[0x0000003a] = "IA32_FEAT_CTL",
[0x0000003b] = "IA32_TSC_ADJUST",
@@ -27,6 +28,7 @@
[0x000000c2] = "IA32_PERFCTR1",
[0x000000cd] = "FSB_FREQ",
[0x000000ce] = "PLATFORM_INFO",
+ [0x000000cf] = "IA32_CORE_CAPS",
[0x000000e2] = "PKG_CST_CONFIG_CONTROL",
[0x000000e7] = "IA32_MPERF",
[0x000000e8] = "IA32_APERF",
$
$ make -C tools/perf O=/tmp/build/perf install-bin
<SNIP>
CC /tmp/build/perf/trace/beauty/tracepoints/x86_msr.o
LD /tmp/build/perf/trace/beauty/tracepoints/perf-in.o
LD /tmp/build/perf/trace/beauty/perf-in.o
LD /tmp/build/perf/perf-in.o
LINK /tmp/build/perf/perf
<SNIP>
Now one can do:
perf trace -e msr:* --filter=msr==IA32_CORE_CAPS
or:
perf trace -e msr:* --filter='msr==IA32_CORE_CAPS || msr==TEST_CTRL'
And see only those MSRs being accessed via:
# perf trace -v -e msr:* --filter='msr==IA32_CORE_CAPS || msr==TEST_CTRL'
New filter for msr:read_msr: (msr==0xcf || msr==0x33) && (common_pid != 8263 && common_pid != 23250)
New filter for msr:write_msr: (msr==0xcf || msr==0x33) && (common_pid != 8263 && common_pid != 23250)
New filter for msr:rdpmc: (msr==0xcf || msr==0x33) && (common_pid != 8263 && common_pid != 23250)
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/lkml/20200401153325.GC12534@kernel.org/
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/arch/x86/include/asm/msr-index.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tools/arch/x86/include/asm/msr-index.h b/tools/arch/x86/include/asm/msr-index.h
index d5e517d1c3dd..12c9684d59ba 100644
--- a/tools/arch/x86/include/asm/msr-index.h
+++ b/tools/arch/x86/include/asm/msr-index.h
@@ -41,6 +41,10 @@
/* Intel MSRs. Some also available on other CPUs */
+#define MSR_TEST_CTRL 0x00000033
+#define MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT 29
+#define MSR_TEST_CTRL_SPLIT_LOCK_DETECT BIT(MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT)
+
#define MSR_IA32_SPEC_CTRL 0x00000048 /* Speculation Control */
#define SPEC_CTRL_IBRS BIT(0) /* Indirect Branch Restricted Speculation */
#define SPEC_CTRL_STIBP_SHIFT 1 /* Single Thread Indirect Branch Predictor (STIBP) bit */
@@ -70,6 +74,11 @@
*/
#define MSR_IA32_UMWAIT_CONTROL_TIME_MASK (~0x03U)
+/* Abbreviated from Intel SDM name IA32_CORE_CAPABILITIES */
+#define MSR_IA32_CORE_CAPS 0x000000cf
+#define MSR_IA32_CORE_CAPS_SPLIT_LOCK_DETECT_BIT 5
+#define MSR_IA32_CORE_CAPS_SPLIT_LOCK_DETECT BIT(MSR_IA32_CORE_CAPS_SPLIT_LOCK_DETECT_BIT)
+
#define MSR_PKG_CST_CONFIG_CONTROL 0x000000e2
#define NHM_C3_AUTO_DEMOTE (1UL << 25)
#define NHM_C1_AUTO_DEMOTE (1UL << 26)
--
2.21.1
next prev parent reply other threads:[~2020-04-13 16:51 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-13 16:51 [GIT PULL] perf/core fixes and improvements Arnaldo Carvalho de Melo
2020-04-13 16:51 ` [PATCH 01/26] perf tools: Synthesize bpf_trampoline/dispatcher ksymbol event Arnaldo Carvalho de Melo
2020-04-13 16:51 ` [PATCH 02/26] perf machine: Set ksymbol dso as loaded on arrival Arnaldo Carvalho de Melo
2020-04-13 16:51 ` [PATCH 03/26] perf annotate: Add basic support for bpf_image Arnaldo Carvalho de Melo
2020-04-13 16:51 ` Arnaldo Carvalho de Melo [this message]
[not found] ` <20200413165203.1816-1-acme-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2020-04-13 16:51 ` [PATCH 05/26] capabilities: Introduce CAP_PERFMON to kernel and user space Arnaldo Carvalho de Melo
2020-04-13 16:51 ` [PATCH 06/26] perf/core: Open access to the core for CAP_PERFMON privileged process Arnaldo Carvalho de Melo
2020-04-13 16:51 ` [PATCH 07/26] perf/core: open access to probes " Arnaldo Carvalho de Melo
2020-04-13 16:51 ` [PATCH 08/26] perf tools: Support CAP_PERFMON capability Arnaldo Carvalho de Melo
2020-04-13 16:51 ` [PATCH 09/26] drm/i915/perf: Open access for CAP_PERFMON privileged process Arnaldo Carvalho de Melo
2020-04-13 16:51 ` [PATCH 10/26] trace/bpf_trace: " Arnaldo Carvalho de Melo
2020-04-13 16:51 ` [PATCH 11/26] powerpc/perf: open " Arnaldo Carvalho de Melo
2020-04-13 16:51 ` [PATCH 12/26] parisc/perf: " Arnaldo Carvalho de Melo
2020-04-13 16:51 ` [PATCH 13/26] drivers/perf: Open " Arnaldo Carvalho de Melo
2020-04-13 16:51 ` [PATCH 14/26] drivers/oprofile: " Arnaldo Carvalho de Melo
2020-04-13 16:51 ` [PATCH 15/26] doc/admin-guide: Update perf-security.rst with CAP_PERFMON information Arnaldo Carvalho de Melo
2020-04-13 16:51 ` [PATCH 16/26] doc/admin-guide: update kernel.rst " Arnaldo Carvalho de Melo
2020-04-13 16:51 ` [PATCH 17/26] perf python: Check if clang supports -fno-semantic-interposition Arnaldo Carvalho de Melo
2020-04-13 16:51 ` [PATCH 18/26] perf script: Simplify auxiliary event printing functions Arnaldo Carvalho de Melo
2020-04-13 16:51 ` [PATCH 19/26] perf bench: Add event synthesis benchmark Arnaldo Carvalho de Melo
2020-04-13 16:51 ` [PATCH 20/26] tools api fs: Make xxx__mountpoint() more scalable Arnaldo Carvalho de Melo
2020-04-13 16:51 ` [PATCH 21/26] perf synthetic-events: save 4kb from 2 stack frames Arnaldo Carvalho de Melo
2020-04-13 16:51 ` [PATCH 22/26] perf stat: Fix no metric header if --per-socket and --metric-only set Arnaldo Carvalho de Melo
2020-04-13 16:52 ` [PATCH 23/26] perf expr: Add expr_ prefix for parse_ctx and parse_id Arnaldo Carvalho de Melo
2020-04-13 16:52 ` [PATCH 24/26] perf expr: Add expr_scanner_ctx object Arnaldo Carvalho de Melo
2020-04-13 16:52 ` [PATCH 25/26] perf metrictroup: Split the metricgroup__add_metric function Arnaldo Carvalho de Melo
2020-04-13 16:52 ` [PATCH 26/26] perf script: Add flamegraph.py script 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=20200413165203.1816-5-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=bp@suse.de \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=williams@redhat.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).