# Mobile GPU Profiling: Mali and Adreno counters

> Read what the phone GPU is actually doing from its hardware counters: headless Arm Streamline capture on Mali with a ranked report (fragment or vertex bound, overdraw, bandwidth, textures), malioc shader cost ranking, and the Adreno route via Snapdragon Profiler or AGI.

Mobile GPU Profiling: Mali and Adreno counters is a free AI agent skill on Agensi by Paul Estephan, in Game Development. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Paul Estephan](https://www.agensi.io/creators/paul-estephan)
- Category: [Game Development](https://www.agensi.io/skills/game-development)
- Version: 1.0.0
- Last updated: 2026-11-19
- Security: scan passed (2026-11-19); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/mobile-gpu-profiling-mali-and-adreno-counters
- Tags: game-development, mobile-development, testing-debugging

## About this skill

### Find out what the phone's GPU is really spending its time on

Fps, memory and temperature tell you *that* a mobile game is slow. This skill reads the GPU's **hardware counters** to tell you *why*: whether the GPU is the limit at all, and if it is, whether the cost is **pixels, vertices, textures, bandwidth or shader math**. Each needs a different fix, so guessing wastes days. In one field capture, a city scene that looked draw-call heavy turned out to be fragment-bound at 94% GPU, so cutting draws would not have helped.

Use it as the escalation step after a first-pass fps/memory triage, when deciding whether a High-tier effect fits the budget, or to find the expensive shader.

#### `gpu_profile.py` subcommands

- **`detect`**: reports the device, GPU vendor and model, driver, Android version and screen size, and which profiling path to use.
- **`mali-capture`**: on first use, builds a GPU-only counter config from Arm's template for your GPU (cached). Then it runs a headless **Arm Streamline** capture of your debuggable app over adb, measures fps from SurfaceFlinger at the same time, and analyses the result. It also cleans up stale `gatord` agents that would otherwise cut the capture short.
- **`mali-analyze`**: re-reads an existing `.apc` capture, with optional fps and screen overrides.
- **`gpu-busy`**: samples the kernel's GPU busy and clock nodes (Adreno kgsl, plus some Mali builds) for a quick utilisation read without a profiler.

#### What the report contains

`report.md` + `metrics.json` with a ranked verdict (GPU-, fragment-, geometry- or CPU-bound) and a fix for each finding. Metrics include GPU utilisation computed row by row across DVFS clock changes, fragment vs non-fragment and tiler load, fragments per screen pixel, render passes per frame, ALU instructions per fragment, compressed and mipmapped texture share, early/late ZS and Forward Pixel Kill, back-face culling, 16-bit varyings, bandwidth in MB per frame and GB/s, and GPU ms per frame. It also adds Arm Performance Advisor's HTML report when the capture has frame markers.

#### Shader cost ranking

- **`malioc_batch.py`** runs the **Mali Offline Compiler** over a directory of GLSL ES or SPIR-V shaders. It ranks them by cycles per pixel or per vertex and names the bounding pipeline (arithmetic, load/store, varying, texture). It flags register pressure and occupancy, stack spilling, late-ZS/discard and low fp16 use. Each compiled shader is labelled with *your* source file, so you know which material to simplify.
- **`godot_dump_shaders.sh`** dumps the exact GLSL ES shaders a Godot 4 (Compatibility) project compiles, via Mesa on the desktop. It uses a throw-away copy of the user data, so saves stay untouched and the shader cache doesn't hide compiles. The references also cover getting shaders out of Unity, three.js and Bevy.

#### Adreno

There is a metric-to-fix table for **Snapdragon Profiler** (Realtime, Trace and Snapshot) and **Android GPU Inspector**, plus Adreno-specific behaviour (FlexRender, LRZ).

#### Privacy

Everything runs locally. The scripts talk only to your phone over adb and to vendor tools you installed yourself (Arm Performance Studio, malioc, Godot/Mesa). No network requests, no telemetry.

## Requires

- Python 3.10+
- adb (Android platform-tools)
- Arm Performance Studio (Mali)
- Snapdragon Profiler or AGI (Adreno)
- A debuggable build of the app

Arm Performance Studio is a free download from Arm and provides Streamline and malioc for Mali captures. Adreno needs Snapdragon Profiler or Android GPU Inspector.

## Known limitations

The Mali path is field-tested on a Mali-G72 (Bifrost) phone on Android 10. The Adreno path is documented but not yet tested on a device; metric names may differ by Snapdragon Profiler version. Arm and Qualcomm tools are not bundled; install them from the vendors.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Mobile GPU Profiling: Mali and Adreno counters skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What does Mobile GPU Profiling: Mali and Adreno counters do?

Read what the phone GPU is actually doing from its hardware counters: headless Arm Streamline capture on Mali with a ranked report (fragment or vertex bound, overdraw, bandwidth, textures), malioc shader cost ranking, and the Adreno route via Snapdragon Profiler or AGI.

### Which AI agents support Mobile GPU Profiling: Mali and Adreno counters?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use Mobile GPU Profiling: Mali and Adreno counters?

Connect your AI agent to Agensi through MCP, then ask it to use Mobile GPU Profiling: Mali and Adreno counters on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
