Updated README
1 file changed
tree: ff77c16dbc14f5d1f387f07d08550ad9602e2d4e
  1. .gitignore
  2. CMakeLists.txt
  3. hwc.hpp
  4. hwc_names.hpp
  5. instrument.h
  6. instruments_stats.cpp
  7. instruments_stats.h
  8. LICENSE
  9. mali_counter.cpp
  10. mali_counter.h
  11. measurement.h
  12. pmu.cpp
  13. pmu.h
  14. pmu_counter.cpp
  15. pmu_counter.h
  16. README.md
README.md

HWCPipe

Introduction

HWCPipe is an interface to the Arm Hardware Counters, designed to allow for easily interfacing with and reading the hardware counters built into Arm hardware.

License

The software is provided under an MIT license. Contributions to this project are accepted under the same license.

Building

To use HWCPipe, build it as a shared library in your Android Project, to do this it must be integrated into your project with CMake.

Using

Performance data

In order for performance data to be displayed, profiling needs to be enabled on the device. Some devices may disable it by default.

Profiling can be enabled via adb:

adb shell setprop security.perf_harden 0

Enabling a Counter:

To enable a counter, create either a PMU or Mali counter and then call its start function.

Instrument instrument_ = PMUCounter();
instrument_.start();

Reading a Counter:

To read a counter, first stop it and then call its measurements function to store results in the MeasurementsMap variable which can then be read from.

instrument_.stop();
MeasurementsMap measurements = instrument_.measurements();

Counters

The counters are separated into two categories: PMU and Mali counters, the available counters are:

PMU

  • CPU cycles
  • CPU instructions
  • Cache miss ratio
  • Branch miss ratio

Mali

  • Timespan
  • GPU cycles
  • Fragment Jobs
  • Vertex/compute jobs
  • L2 cache read lookups
  • L2 cache external reads
  • L2 cache external read stalls
  • L2 cache write lookups
  • L2 cache external writes
  • L2 cache external write stalls

For more information regarding these counters, see Mali Performance Counters.