perf/x86/intel: Bit 13 is valid for Icelake MSR_OFFCORE_RSP_x register
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH RESEND 1/1 perf/x86/intel: Bit 13 is valid for Icelake MSR_OFFCORE_RSP_x register
From Intel SDM, bit 13 of Icelake MSR_OFFCORE_RSP_x register is valid for counting hardware generated prefetches of L3 cache. But current bitmasks in driver takes bit 13 as invalid. Here to fix it.
Before:
$ perf stat -e cpu/event=0xb7,umask=0x1,config1=0x1bfff/u sleep 3 Performance counter stats for 'sleep 3': <not supported> cpu/event=0xb7,umask=0x1,config1=0x1bfff/u
After:
$ perf stat -e cpu/event=0xb7,umask=0x1,config1=0x1bfff/u sleep 3
Performance counter stats for 'sleep 3':
9,293 cpu/event=0xb7,umask=0x1,config1=0x1bfff/u--- arch/x86/events/intel/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/events/intel/core.c +2 -2
@@ -263,8 +263,8 @@ static struct event_constraint intel_icl_event_constraints[] = { };static struct extra_reg intel_icl_extra_regs[]__read_mostly = { -INTEL_UEVENT_EXTRA_REG (0x01b7 ,MSR_OFFCORE_RSP_0 ,0x3fffff9fffull ,RSP_0 ), -INTEL_UEVENT_EXTRA_REG (0x01bb ,MSR_OFFCORE_RSP_1 ,0x3fffff9fffull ,RSP_1 ), +INTEL_UEVENT_EXTRA_REG (0x01b7 ,MSR_OFFCORE_RSP_0 ,0x3fffffbfffull ,RSP_0 ), +INTEL_UEVENT_EXTRA_REG (0x01bb ,MSR_OFFCORE_RSP_1 ,0x3fffffbfffull ,RSP_1 ),INTEL_UEVENT_PEBS_LDLAT_EXTRA_REG (0x01cd ),INTEL_UEVENT_EXTRA_REG (0x01c6 ,MSR_PEBS_FRONTEND ,0x7fff17 ,FE ),EVENT_EXTRA_END
Signature · 1 line
2.17.0
Quoted 9 lines · Yunying Sun
From Intel SDM, bit 13 of Icelake
MSR_OFFCORE_RSP_xregister is valid for
counting hardware generated prefetches of L3 cache. But current bitmasks in driver takes bit 13 as invalid. Here to fix it.Before:
$ perf stat -e cpu/event=0xb7,umask=0x1,config1=0x1bfff/u sleep 3 Performance counter stats for 'sleep 3': <not supported> cpu/event=0xb7,umask=0x1,config1=0x1bfff/u
Quoted 6 lines
After:
$ perf stat -e cpu/event=0xb7,umask=0x1,config1=0x1bfff/u sleep 3 Performance counter stats for 'sleep 3': 9,293 cpu/event=0xb7,umask=0x1,config1=0x1bfff/uSigned-off-by Yunying Sun <[email protected]>
Thanks Yunying.
Kan
Quoted 20 lines
--- arch/x86/events/intel/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/x86/events/intel/core.c +2
-2@@ -263,8 +263,8 @@ static struct event_constraint intel_icl_event_constraints[] = { };static struct extra_reg intel_icl_extra_regs[]__read_mostly = { -INTEL_UEVENT_EXTRA_REG (0x01b7 ,MSR_OFFCORE_RSP_0 ,0x3fffff9fffull ,RSP_0 ), -INTEL_UEVENT_EXTRA_REG (0x01bb ,MSR_OFFCORE_RSP_1 ,0x3fffff9fffull ,RSP_1 ), +INTEL_UEVENT_EXTRA_REG (0x01b7 ,MSR_OFFCORE_RSP_0 ,0x3fffffbfffull ,RSP_0 ), +INTEL_UEVENT_EXTRA_REG (0x01bb ,MSR_OFFCORE_RSP_1 ,0x3fffffbfffull ,RSP_1 ),INTEL_UEVENT_PEBS_LDLAT_EXTRA_REG (0x01cd ),INTEL_UEVENT_EXTRA_REG (0x01c6 ,MSR_PEBS_FRONTEND ,0x7fff17 ,FE ),EVENT_EXTRA_END
Peter Zijlstra
maintainerQuoted 17 lines · Kan
Quoted 14 lines · Yunying Sun
From Intel SDM, bit 13 of Icelake
MSR_OFFCORE_RSP_xregister is valid for
counting hardware generated prefetches of L3 cache. But current bitmasks in driver takes bit 13 as invalid. Here to fix it.Before:
$ perf stat -e cpu/event=0xb7,umask=0x1,config1=0x1bfff/u sleep 3 Performance counter stats for 'sleep 3': <not supported> cpu/event=0xb7,umask=0x1,config1=0x1bfff/uAfter:
$ perf stat -e cpu/event=0xb7,umask=0x1,config1=0x1bfff/u sleep 3 Performance counter stats for 'sleep 3': 9,293 cpu/event=0xb7,umask=0x1,config1=0x1bfff/u
Quoted 5 lines
Quoted 1 line
Signed-off-by Yunying Sun <[email protected]>Thanks Yunying.
Reviewed-by Kan Liang <[email protected]>
Thanks!
tip-bot for Yunying Sun
merge bot[tip:perf/urgent] perf/x86/intel: Fix invalid Bit 13 for Icelake MSR_OFFCORE_RSP_x register
In reply to Yunying Sunperf/x86/intel: Fix invalid Bit 13 for Icelake MSR_OFFCORE_RSP_x register
Commit-ID: 3b238a64c3009fed36eaea1af629d9377759d87d Gitweb: https://git.kernel.org/tip/3b238a64c3009fed36eaea1af629d9377759d87d Author: Yunying Sun <[email protected]> AuthorDate: Wed, 24 Jul 2019 16:29:32 +0800 Committer: Ingo Molnar <[email protected]> CommitDate: Thu, 25 Jul 2019 15:41:30 +0200
perf/x86/intel: Fix invalid Bit 13 for Icelake MSR_OFFCORE_RSP_x register
The Intel SDM states that bit 13 of Icelake's MSR_OFFCORE_RSP_x register is valid, and used for counting hardware generated prefetches of L3 cache. Update the bitmask to allow bit 13.
Before:
$ perf stat -e cpu/event=0xb7,umask=0x1,config1=0x1bfff/u sleep 3 Performance counter stats for 'sleep 3': <not supported> cpu/event=0xb7,umask=0x1,config1=0x1bfff/u
After:
$ perf stat -e cpu/event=0xb7,umask=0x1,config1=0x1bfff/u sleep 3
Performance counter stats for 'sleep 3':
9,293 cpu/event=0xb7,umask=0x1,config1=0x1bfff/u--- arch/x86/events/intel/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/events/intel/core.c +2 -2
@@ -263,8 +263,8 @@ static struct event_constraint intel_icl_event_constraints[] = { };static struct extra_reg intel_icl_extra_regs[]__read_mostly = { -INTEL_UEVENT_EXTRA_REG (0x01b7 ,MSR_OFFCORE_RSP_0 ,0x3fffff9fffull ,RSP_0 ), -INTEL_UEVENT_EXTRA_REG (0x01bb ,MSR_OFFCORE_RSP_1 ,0x3fffff9fffull ,RSP_1 ), +INTEL_UEVENT_EXTRA_REG (0x01b7 ,MSR_OFFCORE_RSP_0 ,0x3fffffbfffull ,RSP_0 ), +INTEL_UEVENT_EXTRA_REG (0x01bb ,MSR_OFFCORE_RSP_1 ,0x3fffffbfffull ,RSP_1 ),INTEL_UEVENT_PEBS_LDLAT_EXTRA_REG (0x01cd ),INTEL_UEVENT_EXTRA_REG (0x01c6 ,MSR_PEBS_FRONTEND ,0x7fff17 ,FE ),EVENT_EXTRA_END