Perfetto Profiler Now Supports Mali GPU Hardware Counters via Panfrost

Perfetto is an open-source system profiler, app tracer, and trace analyzer for Linux, Android & Chrome platforms, and user-space apps. The program can already visualize CPU and memory usage, as well as power consumption.  GPU support is more limited with the program only capable of sampling the GPU frequency when the driver outputs that information via ftrace.

When Perfetto is also extendable thanks to a Tracing C++ SDK that “allows userspace applications to emit trace events and add more app-specific context to a Perfetto trace”. Collabora made use of the tracing SDK to add support for Mali Midgard GPU performance profiling in gfx-pps project using the Mali GPU hardware counters exposed via Panfrost open-source Mali GPU driver.

After following the installation instructions, you’ll be able to run the following executables for tracing and profiling:

  • tracedtracing service.
  • traced_probes OS probes service.
  • perfetto command-line tool for recording traces.
  • producer-gpuproviding the Panfrost data source.

There’s also gpu.cfgconfig file to feed as input to Perfetto describing what to trace, and found in gfx-pps/scripts directory.

Run the following command to quickly get started


Run whatever GPU workload you’d like to profile, and once tracing is complete, you can open trace file with in Chrome Browser (I first tried in Firefox and it won’t load).

Perfetto Mali GPU Profiling

The screenshot above shows some of the GPU parameters including CPU/GPU balancing (not make sure the CPU is not the bottleneck), Vertex/Fragment balancing, and Tripipe (Arithmetic/Load-Store/Texture) balancing using a trace of WebGL Aquarium taken on a Rockchip RK3399 SoC equipped with a Mali-860MP4 Midgard GPU.

The gfx-pps project is under active development on FreeDesktop’s GitLab and licensed under an MIT license. You’ll find the Panfrost data source in gfx-pps/src/gpu/panfrost/gpu_ds.h file, and the implementation of more GPU data sources is planned.

More details about gfx-pps project can be found on Collabora blog.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard
Notify of
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
1 Comment
3 years ago

This is awesome, for older hardware. I actually modified a Galaxy S6 and we (meaning us (mobile) tech enthusiasts) all know that it has the 20nm Samsung fabbed Exynos 7420 aka 4x ARM based A57 + A55 cores clocked at 2.1GHz max but, the important part is the Mali-T760 MP8. I took the logic board out of the phones glass sandwich and put a custom micro copper finned heatsink on the SOC. Looks like a mini ZALMAN. This Mali-T760 MP8 runs flat out at 772 MHz. When it’s clocked that high and holds it’s frequency without throttling, you’d be surprised… Read more »

Khadas VIM4 SBC