Hardware counters are only supported for Mali driver versions r26p0 (Midgard) and r14p0 (Bifrost) onwards.
Check the driver version on Android by using the GA Daemon App "GLInfo" tab.
It will be embedded into the string tagged as "GL_VERSION".
On Linux platforms, you must manually call "glGetString(GL_VERSION)" in your own OpenGL ES application to get the same information.
Hardware counters are not supported with Headless Mode.
You should delete the hardware counters configuration file before starting a headless trace, otherwise your application will hang until terminated.
Hardware counters visualisation is only supported for tracing a single process at a time.
Running two processes in parallel will result in combining both processes into the same visualisation (attributed to the first process in GA).
GA will discard counter data after the first process has terminated or disconnected.
To run the same process more than once, you must disconnect and re-connect to the device between runs.
GA now supports collecting and visualising per-frame hardware counters provided by the Mali driver.
Configuring the driver on Android
You will need root access to your device to enable hardware counters.
We recommend using the automated configuration uploader.
The configuration uploader can be launched by clicking the
You must specify a process to trace in order to enable the counters.
GA can automatically generate the process name for any of the installed APK packages on the device.
If you are running a native application, you can manually enter the process name instead.
Please note that you will need to re-upload the configuration file after rebooting the device.
You can manually configure the driver in a similar manner to the Linux case below.
You will need to create a directory at /data/data/com.mali.testjava.
Upload the .mali_config file to that location and set the user permissions to 777.
You will have to manually upload a configuration file to the device.
On Linux, the Mali driver will search for the configuration file in the working directory at the moment that you launch the application.
To enable all hardware counters, create a file called .mali_config with the following contents:
# This will enable counters for any process
To only enable counters for a single application, preface the MALI_HWC_DUMP_PER_EVENT=1
with a process name, e.g. MyProcessName:MALI_HWC_DUMP_PER_EVENT=1
Visualising the counter data
The next time you launch the application while connected to GA, data will appear in the Counters Graph view.
By default, GA will display up to 30 frames of data, based on the frame that is selected in the trace.
You can remove the filter by right-clicking on the Counters Graph view.
You can also customize the filters by frame number or value (or both, e.g. the top 10% of GPU active frames after frame 30).
You can also sort the counters by frame index or counter value from the context menu.
You can invert the sort direction by clicking on the currently selected sort option (lowest -> highest is the default).
Currently, only a subset of collected counter data can be visualised.
Rendering the graph repeatedly during a live trace is very computationally expensive and will slow down GA.
You may want to hide or close the view during a large live trace and run an analysis at the end.
Enabling a frame filter will reduce the workload by limiting the number of nodes to render.
If you disconnect the interceptor from a process before it completes, the driver will start emitting messages like [HWCF] Frame data buffer full - recording is too slow.
This is the expected driver behaviour when closing the driver connection while a process is running, and does not indicate an error in the driver.
The message should stop after the process is terminated.