Analyze GPU Trace PC samples and stalls
analyze_gpu_trace_pc_samplingDecode PC-sampling records to identify stall reasons, attribute samples to shaders and code blocks, and rank top shader and instruction-PC hotspots within a trace, time window, or marker.
Instructions
Decode raw PC-sampling records into sample/stall reasons, exact shader/code-block attribution, and top shader and instruction-PC hotspots. Scope the query to the entire trace, a frame-relative time window, or a timed marker id such as BasePass. This does not require shader PDBs; source-line and SASS text correlation are not claimed.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"report_id": "<report_id>"
},
"name": "analyze_gpu_trace_pc_sampling"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stage | No | Exact shader stage such as PS, VS, CS, or GS. | |
| end_ms | No | Inclusive time-window end relative to the presented frame. | |
| top_pcs | No | ||
| start_ms | No | Inclusive time-window start relative to the presented frame. | |
| marker_id | No | Use one paired BeginEvent/EndEvent marker as the time window. Cannot be combined with start_ms or end_ms. | |
| report_id | Yes | GPU Trace report session id returned by collect_gpu_trace_report or open_gpu_trace_export. | |
| shader_hash | No | ||
| top_reasons | No | ||
| top_shaders | No |