System Metrics Mali Package (SMM) Welcome to the System Metrics Mali discussion thread. You can use this thread to ask for help, share feedback, and have discussions about the experimental System Metrics Mali package. Introduction System Metrics Mali provides a simple and extensible interface for reading GPU hardware counters on Arm GPUs. Hardware counters provide a low-level view of application performance. These metrics can provide insight into what impact your changes produce on the hardware level. System Metrics Mali package exposes a set of hardware metrics via Unity Profiler window and Unity ProfilerRecorder API. Disclaimer: This package is still under development and anything could change on the API side. High-level features summary It allows access to and monitoring of GPU low-level counters. Sampling of the counters is performed on a per-frame level, so you can monitor changes in hardware system metrics along with other Unity Profiler frame stats. Resources For more information, please have a look at: Package documentation page Mali Performance Counters documentation HWCP library documentation page Requirements The minimum required Unity version is 2021.2 Supports Samsung Exynos, HiSilicon Kirin, or MediaTek CPUs (as these use Mali GPU's) Doesn’t support Qualcomm Snapdragon CPUs (as these use Adreno GPU's) Getting started Download Unity 2021.2.0a17 or newer through the Hub. Create or open a Unity project. Go to Window > Package Manager. Follow “Adding a registry package by name” instructions and add “com.unity.profiling.systemmetrics.mali” Build and run your application Go to Window > Analysis > Profiler Connect to a device and start capturing Click on Profiler Module > Gear Icon Click Add icon > Add counters from User group Current state The experimental System Metrics Mali Package is still under development and only a limited number of counters are currently available. When using this package you can expect that: It should have zero CPU overhead if no hardware counters are being read through ProfilerRecorder API and/or Profiler isn’t attached It has minimal fixed memory overhead of around 5-10Kb Hardware counters are sampled on a per-frame basis. Currently, whenever an application has CPU spikes that might cause System Metrics Mali to sample a portion of the next frame that looks like a spike up followed by a spike down. This is caused by captured frame interval and GPU frame interval misalignment. Most values are provided as absolute GPU cycles. This is due to the fact that GPU frequency is unavailable on most phones and we can’t measure relative performance. Older phones might have outdated implementations, but generally, the plugin should work on any phone released after 2010. What's next We plan to significantly improve UI usability by introducing of custom Profiler Module which would allow providing pre-configured Profiler Module and have custom visualization for the counters Replace absolute value counters with relative counters related to specific GPU pipeline stage Add more hardware counters for different GPU pipeline stages to have high-level for each stage which might be an application bottleneck Add support for non-mobile platforms and CPUs Feedback In terms of feedback, we're especially looking for: Are there any workflows that are unclear or missing? Any hardware compatibility or stability issues? Are there any issues or unclear parts in the documentation? Please feel free to post any feedback in this sub-forum. How to report bugs Ideally, we'd like any bugs reported through the built-in bug reporter tool, as that will automatically provide us with some relevant context. When reporting bugs, please: Report exact mobile phone model name and number Attach logcat logs files if available Once you have submitted a bug report through the bug reporter, please feel free to start a discussion about it in this thread. Thank you for your interest, we're looking forward to your feedback!