profiler-gc-alloc
Identify the top functions causing garbage collection allocations in a Unity profiler frame, including full call paths, to diagnose and eliminate frame hitches.
Instructions
Returns the top N functions with the highest GC (garbage collection) allocations in a profiler frame, including their call paths. GC allocations are a major source of frame hitches in Unity — use this to find and eliminate them.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "profiler-gc-alloc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frameIndex | No | Frame index to analyze. Use -1 for the latest available frame. Default: -1 | -1 |
| threadIndex | No | Thread index. 0 = Main Thread. Default: 0 | 0 |
| topN | No | Number of top entries to return. Default: 20 | 20 |
| minBytes | No | Minimum GC allocation bytes to include. Filters out trivial allocations. Default: 0 | 0 |
| maxDepth | No | Maximum tree depth to scan. Default: 15 | 15 |