With Linux and perf 4.15.0-55-generic (non-HWE), it works as reported in
Ubuntu 18.04.3 LTS:
Versions
--------
$ uname -r
4.15.0-55-generic
$ perf --version
perf version 4.15.18
In dpkg:
ii linux-image-4.15.0-55-generic 4.15.0-55.60
amd64 Signed kernel image generic
ii linux-tools-common 4.15.0-55.60
all Linux kernel version specific tools for version 4.15.0
ii linux-tools-4.15.0-55-generic 4.15.0-55.60
amd64 Linux kernel version specific tools for version 4.15.0-55
A minimal series of steps necessary to make it happen
-----------------------------------------------------
1. In a terminal tab., run:
$ top
2. In another tab, run
$ perf top -p `pidof top`
3. Look at the output of "perf top".
What you expected to happen
---------------------------
I expect to see "cycles" events being reported for the process "top"
(started at step 1.)
What actually happened
----------------------
I see this, so it works:
Samples: 136 of event 'cycles:ppp', Event count (approx.): 54426558
Overhead Shared Object Symbol
8.48% libc-2.27.so [.] _IO_vfscanf
6.49% [kernel] [k] do_syscall_64
4.06% [kernel] [k] pid_revalidate
3.50% [kernel] [k] syscall_return_via_sysret
3.05% [kernel] [k] vsnprintf
2.90% [kernel] [k] get_pid_task
2.88% [kernel] [k] seq_put_decimal_ull
2.75% [kernel] [k] __task_pid_nr_ns
2.74% [kernel] [k] seq_put_decimal_ll
2.71% libc-2.27.so [.] __GI_____strtoull_l_internal
2.41% [kernel] [k] format_decode
2.38% [kernel] [k] memcpy_erms
2.18% libc-2.27.so [.] vfprintf
1.93% [kernel] [k] pid_nr_ns
1.79% [kernel] [k] __d_lookup_rcu
1.63% [kernel] [k] rcu_all_qs
1.58% [kernel] [k] filldir
1.39% [kernel] [k] render_sigset_t
System calls
------------
perf_event_open System calls:
$ strace perf top -p `pidof top` 2>&1 | grep ^perf_event_open
perf_event_open({type=PERF_TYPE_HARDWARE, size=PERF_ATTR_SIZE_VER5,
config=PERF_COUNT_HW_CPU_CYCLES, ...}, 0, -1, -1, 0) = 3
perf_event_open({type=PERF_TYPE_SOFTWARE, size=0 /* PERF_ATTR_SIZE_??? */,
config=PERF_COUNT_SW_CPU_CLOCK, ...}, -1, 6, -1, PERF_FLAG_FD_CLOEXEC) = 3
perf_event_open({type=PERF_TYPE_HARDWARE, size=PERF_ATTR_SIZE_VER5,
config=PERF_COUNT_HW_CPU_CYCLES, ...}, -1, 0, -1, PERF_FLAG_FD_CLOEXEC) = 3
perf_event_open({type=PERF_TYPE_HARDWARE, size=PERF_ATTR_SIZE_VER5,
config=PERF_COUNT_HW_CPU_CYCLES, ...}, -1, 0, -1, PERF_FLAG_FD_CLOEXEC) = 3
perf_event_open({type=PERF_TYPE_HARDWARE, size=PERF_ATTR_SIZE_VER5,
config=PERF_COUNT_HW_CPU_CYCLES, ...}, 12089, -1, -1, PERF_FLAG_FD_CLOEXEC) = 3
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1839852
Title:
perf broken on hwe kernel 5.0.0-23
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-hwe/+bug/1839852/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs