1

I have a Qualcomm Development board with a Kryo 680 processor running a userdebug build of Android 11. I want to run some programs (e.g., benchmarks) and profile them using the ARM Streamline program. Unfortunately, some PMU registers return zero values.

Zero PMU values

I am getting the following warnings from Streamline.

Streamline Warnings

Warning 1: No Perf PMUs detected
Could not detect any Perf PMUs in /sys/bus/event_source/devices/ but the system contains recognised CPUs. The system may not support perf hardware counters. Check CONFIG_HW_PERF_EVENTS is set and that the PMU is configured in the target device tree.

Warning 2: Profiling Source
Using perf API for primary data source

Warning 3: Atrace is disabled
Unable to locate notify.dex

I am unsure of what to change in order to access the PMU counters. Is it an issue of gator? I am the pre-compiled version of gator provided with Streamline 8.0.

EDIT: Some more information printed by the gator daemon in the adb shell.

Unable to enable 1 perf groups due to them being reported as being disabled due to conflict or insufficient resources.
Another process may be using one or more perf counters.
Use `lsof|grep perf_event` (if available) to find other processes that may be using perf counters.
Not all event data may be available in the capture.
See debug log for more information.

The printout of lsof|grep perf_event is the following.

Binder:7545_3  7545     system  101u     0000               0,13       0t0      15649 anon_inode:[perf_event]
Binder:7545_3  7545     system  103u     0000               0,13       0t0      15649 anon_inode:[perf_event]
vic
  • 359
  • 4
  • 18
  • Did you check `CONFIG_HW_PERF_EVENTS` in the kernel config of the kernel your system is using, like Streamline suggested? Depending on build options, the kernel may keep it in RAM as `/proc/config.gz`, or it might be part of the filesystem, or you could go looking in the source tree for the dev board's kernel package or whatever. If they didn't enable it, you may need to build a custom kernel with support for that API. (Unless streamline can fall back to something else.) Does `perf stat /bin/true` work? – Peter Cordes Jun 03 '22 at 02:08
  • I've verified that `CONFIG_HW_PERF_EVENTS` is enabled. `perf stat /bin/true` does not work but using `simpleperf` does. – vic Jun 06 '22 at 20:54
  • Some more info. [This](https://i.imgur.com/xjP15SS.png) is a capture with some CPU stats (Cycles and Cache Accesses). All of them have values. [This](https://i.imgur.com/16KcQRp.png) is another capture where Thermal Throttling Stats have been added in the list. All the CPU stats are zero now. This happens when I add other stats as well (e.g., CPU Clock from Perf Software). I am not sure why this is the case. – vic Jun 06 '22 at 22:51

0 Answers0