lkml.org 
[lkml]   [2022]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 10/12] perf tools: Improve IBS error handling
Arnaldo,

On 09-Feb-22 9:17 PM, Arnaldo Carvalho de Melo wrote:
> Em Tue, Feb 08, 2022 at 01:16:35PM -0800, Stephane Eranian escreveu:
>> From: Kim Phillips <kim.phillips@amd.com>
>>
>> improve the error message returned on failed perf_event_open() on AMD when
>> using IBS.
>>
>> Output of executing 'perf record -e ibs_op// true' BEFORE this patch:
>>
>> The sys_perf_event_open() syscall returned with 22 (Invalid argument)for event (ibs_op//u).
>> /bin/dmesg | grep -i perf may provide additional information.
>
> Humm, here on a
>
> $ grep -m1 'model name' /proc/cpuinfo
> model name : AMD Ryzen 9 5950X 16-Core Processor
> $ ls -la /sys/devices/ibs_op
> total 0
> drwxr-xr-x. 4 root root 0 Feb 9 07:12 .
> drwxr-xr-x. 21 root root 0 Feb 9 07:12 ..
> drwxr-xr-x. 2 root root 0 Feb 9 12:17 format
> -rw-r--r--. 1 root root 4096 Feb 9 12:21 perf_event_mux_interval_ms
> drwxr-xr-x. 2 root root 0 Feb 9 12:21 power
> lrwxrwxrwx. 1 root root 0 Feb 9 07:12 subsystem -> ../../bus/event_source
> -r--r--r--. 1 root root 4096 Feb 9 12:17 type
> -rw-r--r--. 1 root root 4096 Feb 9 07:12 uevent
> $ cat /sys/devices/ibs_op/type
> 9
> $
>
> Running without this patch:
>
> $ uname -a
> Linux five 5.15.14-100.fc34.x86_64 #1 SMP Tue Jan 11 16:53:51 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
> $
>
> $ cat /etc/redhat-release
> Fedora release 34 (Thirty Four)
> $
>
> $ perf record -e ibs_op// true
> Error:
> Invalid event (ibs_op//u) in per-thread mode, enable system wide with '-a'.
> $
>
> Trying with system wide:
>
> $ perf record -a -e ibs_op// true
> Error:
> The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (ibs_op//u).
> /bin/dmesg | grep -i perf may provide additional information.
>
> $
>
> So you're missing -a in all examples? Am I missing something?

AMD IBS does not support per-thread monitoring because it's configured
as uncore pmu (perf_invalid_context).

Thanks,
Ravi

\
 
 \ /
  Last update: 2022-03-15 07:50    [W:0.122 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site