I'd like to use perf record to look into some performance counters. I'm using a ThunderX2 system with Centos 8. When i use any of the uncore counters such as uncore_l3c_0/evict_request/, uncore_dmc_1/cnt_cycles/, uncore_dmc_0/cnt_cycles/ I get the same error "The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event ..." Do you guys have any suggestions? see below for more details. Thanks
# rpm -qa |grep perf
# uname -r
# perf record -a -e uncore_dmc_0/cnt_cycles/ ls
Lowering default frequency rate to 1600.
Please consider tweaking /proc/sys/kernel/perf_event_max_sample_rate.
The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (uncore_dmc_0/cnt_cycles/).
/bin/dmesg | grep -i perf may provide additional information.
# /bin/dmesg | grep -i perf |tail -n 3
[194444.313119] perf: interrupt took too long (38453 > 38357), lowering kernel.perf_event_max_sample_rate to 5200
[194444.388648] perf: interrupt took too long (48338 > 48066), lowering kernel.perf_event_max_sample_rate to 4100
[194961.878397] perf: interrupt took too long (60611 > 60422), lowering kernel.perf_event_max_sample_rate to 3200
Thanks for the tip. I tested it and it worked.
# started on Wed May 5 13:11:18 2021
Performance counter stats for 'system wide':
3.766226605 seconds time elapsed