Re: Some unc_cha_tor_* events appear to be "not supported"?

From: Liang, Kan
Date: Thu Jul 25 2024 - 09:38:10 EST




On 2024-07-24 6:39 p.m., Song Liu wrote:
> Hi folks,
>
> We noticed that some unc_cha_tor_occupancy and unc_cha_tor_inserts events
> appear to be "not supported" and always counting zero (see an example below).
> Is this a known issue? We are testing with 6.10 kernel and perf.
>
> Thanks,
> Song
>
>
> [root@kerneltest008.05.atn6 ~]# ./perf list | grep
> unc_cha_tor_occupancy.ia_hit_llcprefdrd
> unc_cha_tor_occupancy.ia_hit_llcprefdrd
> [root@kerneltest008.05.atn6 ~]# ./perf stat -e
> unc_cha_tor_occupancy.ia_hit_llcprefdrd -a -- sleep 1
> WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'


The value '4b433' is for the 'Filter1', according to the original event
list.

https://github.com/intel/perfmon/blob/main/SKX/events/skylakex_uncore.json#L4634

"EventName": "UNC_CHA_TOR_OCCUPANCY.IA_MISS_LlcPrefDRD",
"BriefDescription": "UNC_CHA_TOR_OCCUPANCY.IA_MISS_LlcPrefDRD",
"PublicDescription": "UNC_CHA_TOR_OCCUPANCY.IA_MISS_LlcPrefDRD",
"Counter": "0",
"MSRValue": "0x00",
"ELLC": "0",
"Filter": "Filter1",
"ExtSel": "0",
"Deprecated": "0",
"FILTER_VALUE": "0x4b433"

There are two filters for CHA on SKX. Each filter is 32 bits wide.
So the Linux kernel driver uses config1 (64 bits wide) to represent both
of them. The low 32 bits are for filter0 and high 32 bits are for filter1.

It should be an issue of the convert script, which set the filter1 value
to the low 32 bits.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/pmu-events/arch/x86/skylakex/uncore-cache.json#n4489

Can you please try the below event?
uncore_cha/event=0x35,umask=0x11,config1=0x4b43300000000/

Thanks,
Kan
> not supported by kernel)!
> WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'
> not supported by kernel)!
> WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'
> not supported by kernel)!
> WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'
> not supported by kernel)!
> WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'
> not supported by kernel)!
> WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'
> not supported by kernel)!
> WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'
> not supported by kernel)!
> WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'
> not supported by kernel)!
> WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'
> not supported by kernel)!
> WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'
> not supported by kernel)!
> WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'
> not supported by kernel)!
> WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'
> not supported by kernel)!
> WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'
> not supported by kernel)!
> WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'
> not supported by kernel)!
> WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'
> not supported by kernel)!
> WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'
> not supported by kernel)!
> WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'
> not supported by kernel)!
> WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'
> not supported by kernel)!
> WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'
> not supported by kernel)!
> WARNING: event 'N/A' not valid (bits 10,12-13,15 of config1 '4b433'
> not supported by kernel)!
>
> Performance counter stats for 'system wide':
>
> 0 unc_cha_tor_occupancy.ia_hit_llcprefdrd
>
> 1.001680312 seconds time elapsed
>
> [root@kerneltest008.05.atn6 ~]# grep "model name" -m 1 /proc/cpuinfo
> model name : Intel(R) Xeon(R) Gold 6138 CPU @ 2.00GHz
> [root@kerneltest008.05.atn6 ~]# uname -r
> 6.10.0
> [root@kerneltest008.05.atn6 ~]# ./perf -vv
> perf version 6.10.g0c3836482481
> dwarf: [ on ] # HAVE_DWARF_SUPPORT
> dwarf_getlocations: [ on ] # HAVE_DWARF_GETLOCATIONS_SUPPORT
> syscall_table: [ on ] # HAVE_SYSCALL_TABLE_SUPPORT
> libbfd: [ OFF ] # HAVE_LIBBFD_SUPPORT
> debuginfod: [ OFF ] # HAVE_DEBUGINFOD_SUPPORT
> libelf: [ on ] # HAVE_LIBELF_SUPPORT
> libnuma: [ OFF ] # HAVE_LIBNUMA_SUPPORT
> numa_num_possible_cpus: [ OFF ] # HAVE_LIBNUMA_SUPPORT
> libperl: [ OFF ] # HAVE_LIBPERL_SUPPORT
> libpython: [ on ] # HAVE_LIBPYTHON_SUPPORT
> libslang: [ OFF ] # HAVE_SLANG_SUPPORT
> libcrypto: [ on ] # HAVE_LIBCRYPTO_SUPPORT
> libunwind: [ on ] # HAVE_LIBUNWIND_SUPPORT
> libdw-dwarf-unwind: [ on ] # HAVE_DWARF_SUPPORT
> libcapstone: [ OFF ] # HAVE_LIBCAPSTONE_SUPPORT
> zlib: [ on ] # HAVE_ZLIB_SUPPORT
> lzma: [ on ] # HAVE_LZMA_SUPPORT
> get_cpuid: [ on ] # HAVE_AUXTRACE_SUPPORT
> bpf: [ on ] # HAVE_LIBBPF_SUPPORT
> aio: [ on ] # HAVE_AIO_SUPPORT
> zstd: [ on ] # HAVE_ZSTD_SUPPORT
> libpfm4: [ OFF ] # HAVE_LIBPFM
> libtraceevent: [ on ] # HAVE_LIBTRACEEVENT
> bpf_skeletons: [ on ] # HAVE_BPF_SKEL
> dwarf-unwind-support: [ on ] # HAVE_DWARF_UNWIND_SUPPORT
> libopencsd: [ OFF ] # HAVE_CSTRACE_SUPPORT
>