MGD now supports collecting and visualising per-frame hardware counters provided by the Mali driver.
Configuring the driver on Android
We recommend using the automated configuration uploader. The configuration uploader can be launched by clicking the button (requires a DS-5 license to enable).
You must specify a process to trace in order to enable the counters. MGD 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.
MALI_HWC_DUMP_JM_MAP=0xFFFFFFFFFFFFFFFF MALI_HWC_DUMP_MMU_L2C_MAP=0xFFFFFFFFFFFFFFFF MALI_HWC_DUMP_SC_MAP=0xFFFFFFFFFFFFFFFF MALI_HWC_DUMP_TILER_MAP=0xFFFFFFFFFFFFFFFF MALI_TIMELINE_UDS_LOSSLESS_MODE=1 # This will enable counters for any process MALI_HWC_DUMP_PER_EVENT=1To 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 MGD, data will appear in the Counters Graph view.
By default, MGD 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 customise 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.