[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <069404c1-3c37-4ace-ebcf-8db5b3ac0080@amd.com>
Date: Tue, 15 Mar 2022 12:19:36 +0530
From: Ravi Bangoria <ravi.bangoria@....com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: linux-kernel@...r.kernel.org, peterz@...radead.org,
kim.phillips@....com, acme@...hat.com, jolsa@...hat.com,
songliubraving@...com, Stephane Eranian <eranian@...gle.com>,
Ravi Bangoria <ravi.bangoria@....com>
Subject: Re: [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@....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
Powered by blists - more mailing lists