Hi Punit
On 21/11/2023 11:37, Suzuki K Poulose wrote:
Hi Punit
On 15/11/2023 13:59, Punit Agrawal wrote:
Hi,
I am hitting some issues when capturing instruction trace using 'perf' on an Arm N2 based system.
After enabling ACPI support[0] for TRBE on top of v6.6, the kernel successfully probes all the ETE and TRBE devices. I see "ete" and "trbe" device folders (one per CPU) in /sys/bus/coresight/devices.
Do you see all trbe devices corresponding to the number of CPUs ?
When capturing trace using 'perf', I see the following error with no trace captured.
# perf record -e cs_etm//u <workload> failed to mmap with 12 (Cannot allocate memory)
That looks like a problem when you don't have a sink to capture the trace or there was an error in the allocation of memory.
The error goes away if a cpu is specified using '-C' option to 'perf record'
# perf record -e cs_etm//u -C 10 <workload>
[...]
[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.422 MB perf.data ]
That also looks suspicious as the size is too small. Does the perf report show any AUX records ?
This is what I get on my (FVP) model.
# ./perf-6.7 record -e cs_etm//u <multi-threaded-workload> ... [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 94.059 MB perf.data ]
# grep arm_trbe /proc/interrupts 22: 0 0 18 11 0 12 12 0 GICv3 31 Level arm_trbe
# cd /sys/bus/coresight/devices/ # ls -l total 0 lrwxrwxrwx 1 root root 0 Nov 21 14:55 ete0 -> ../../../devices/system/cpu/cpu0/ARMHC500:00/ete0 lrwxrwxrwx 1 root root 0 Nov 21 14:55 ete1 -> ../../../devices/system/cpu/cpu1/ARMHC500:01/ete1 lrwxrwxrwx 1 root root 0 Nov 21 14:55 ete2 -> ../../../devices/system/cpu/cpu2/ARMHC500:02/ete2 lrwxrwxrwx 1 root root 0 Nov 21 14:55 ete3 -> ../../../devices/system/cpu/cpu3/ARMHC500:03/ete3 lrwxrwxrwx 1 root root 0 Nov 21 14:55 ete4 -> ../../../devices/system/cpu/cpu4/ARMHC500:04/ete4 lrwxrwxrwx 1 root root 0 Nov 21 14:55 ete5 -> ../../../devices/system/cpu/cpu5/ARMHC500:05/ete5 lrwxrwxrwx 1 root root 0 Nov 21 14:55 ete6 -> ../../../devices/system/cpu/cpu6/ARMHC500:06/ete6 lrwxrwxrwx 1 root root 0 Nov 21 14:55 ete7 -> ../../../devices/system/cpu/cpu7/ARMHC500:07/ete7 lrwxrwxrwx 1 root root 0 Nov 21 14:55 trbe0 -> ../../../devices/platform/arm,trbe/trbe0 lrwxrwxrwx 1 root root 0 Nov 21 14:55 trbe1 -> ../../../devices/platform/arm,trbe/trbe1 lrwxrwxrwx 1 root root 0 Nov 21 14:55 trbe2 -> ../../../devices/platform/arm,trbe/trbe2 lrwxrwxrwx 1 root root 0 Nov 21 14:55 trbe3 -> ../../../devices/platform/arm,trbe/trbe3 lrwxrwxrwx 1 root root 0 Nov 21 14:55 trbe4 -> ../../../devices/platform/arm,trbe/trbe4 lrwxrwxrwx 1 root root 0 Nov 21 14:55 trbe5 -> ../../../devices/platform/arm,trbe/trbe5 lrwxrwxrwx 1 root root 0 Nov 21 14:55 trbe6 -> ../../../devices/platform/arm,trbe/trbe6 lrwxrwxrwx 1 root root 0 Nov 21 14:55 trbe7 -> ../../../devices/platform/arm,trbe/trbe7
Thanks Suzuki
Is this a known issue? Perhaps I am missing some required dependencies.
No, this is not.
Thanks, Punit
[0] https://lore.kernel.org/all/20230829135405.1159449-1-anshuman.khandual@arm.c...