I'm trying to run perf c2c
on a fresh installation of Ubuntu 24.04, but it's not working as expected.
The command I'm using is:
$ perf c2c record ls
or just
$ perf c2c record
However, I'm getting the following error:
event syntax error: '..em-loads,ldlat=30/P' \___ Bad event or PMUUnable to find PMU or event on a PMU of 'cpu_atom'Initial error:event syntax error: '..em-loads,ldlat=30/P' \___ unknown term 'ldlat' for pmu 'cpu_atom'valid terms: event,pc,edge,inv,umask,cmask,config,config1,config2,config3,name,period,freq,branch_type,time,call-graph,stack-size,no-inherit,inherit,max-stack,nr,no-overwrite,overwrite,driver-config,percore,aux-output,aux-sample-size,metric-id,raw,legacy-cache,hardwareRun 'perf list' for a list of valid events Usage: perf record [<options>] [<command>] or: perf record [<options>] -- <command> [<options>] -e, --event <event> event selector. use 'perf list' to list available events
When I check the available events using perf c2c record -e list
, I see the following:
$ perf c2c record -e listldlat-loads : availableldlat-stores : available
Here are some details about my setup:
$ uname -r6.8.0-40-generic$ /usr/lib/linux-tools/6.8.0-40-generic/perf --versionperf version 6.8.12$ perf --versionperf version 6.8.12$ grep -vE '^\s*#|^\s*$' /etc/sysctl.confkernel.perf_event_paranoid = -1kernel.kptr_restrict = 0$ perf list | grep 'mem-loads\|mem-stores'mem-loads OR cpu_atom/mem-loads/ [Kernel PMU event]mem-stores OR cpu_atom/mem-stores/ [Kernel PMU event]mem-loads OR cpu_core/mem-loads/ [Kernel PMU event]mem-loads-aux OR cpu_core/mem-loads-aux/ [Kernel PMU event]mem-stores OR cpu_core/mem-stores/ [Kernel PMU event]$ perf c2c Usage: perf c2c {record|report} -v, --verbose be more verbose (show counter open errors, etc)$ lscpuArchitecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 46 bits physical, 48 bits virtual Byte Order: Little EndianCPU(s): 6 On-line CPU(s) list: 0-5Vendor ID: GenuineIntel Model name: 12th Gen Intel(R) Core(TM) i5-12600
It seems that the ldlat
option is taken from here
https://github.com/torvalds/linux/blob/v6.8/tools/perf/builtin-c2c.c#L3254
Just to clarify, I am running it on a bare metal machine, not in a virtualized environment or container.
Additionally I have tried to run it with -e
$ perf c2c record -e ldlat-loadsevent syntax error: '..em-loads,ldlat=30/P' \___ Bad event or PMUUnable to find PMU or event on a PMU of 'cpu_atom'Initial error:event syntax error: '..em-loads,ldlat=30/P' \___ unknown term 'ldlat' for pmu 'cpu_atom'valid terms: event,pc,edge,inv,umask,cmask,config,config1,config2,config3,name,period,freq,branch_type,time,call-graph,stack-size,no-inherit,inherit,max-stack,nr,no-overwrite,overwrite,driver-config,percore,aux-output,aux-sample-size,metric-id,raw,legacy-cache,hardwareRun 'perf list' for a list of valid events Usage: perf record [<options>] [<command>] or: perf record [<options>] -- <command> [<options>] -e, --event <event> event selector. use 'perf list' to list available events
$ perf c2c record -e ldlat-storesError:The cpu_atom/mem-stores/P event is not supported.
perf record
works fine, but perf c2c record
throws the above error.
I would really like to use c2c
. Does anyone have any ideas on how to fix this?
Thanks in advance!