title: Access PMU registers in ARM Streamline
body: <p>I have a <a href="https://developer.qualcomm.com/hardware/snapdragon-888-hdk" rel="nofollow noreferrer">Qualcomm Development board with a Kryo 680 processor</a> 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.</p>
  <p><a href="https://i.stack.imgur.com/HSvk5.png" rel="nofollow noreferrer">Zero PMU values</a></p>
  <p>I am getting the following warnings from Streamline.</p>
  <p><a href="https://i.imgur.com/yHb1yWT.png" rel="nofollow noreferrer">Streamline Warnings</a></p>
  <pre><code>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
  </code></pre>
  <p>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.</p>
  <p><strong>EDIT</strong>: Some more information printed by the gator daemon in the adb shell.</p>
  <pre><code>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.
  </code></pre>
  <p>The printout of <code>lsof|grep perf_event</code> is the following.</p>
  <pre><code>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]
  </code></pre>