Repository navigation
Releases: partprogramming09/metal-gpu-trace
Releases · partprogramming09/metal-gpu-trace
Release list
v0.7.1
v0.7.0
PERF_INSTRUMENTS="Time Profiler;Metal GPU Counters"adds Instruments to the Metal System Trace recording; their
tables live in the.trace, so it pairs withKEEP_TRACE=1.trace_count: rows of several tables of a kept.trace, in all and per process; by default the tables that
matter for a translation layer. Measured on drawstress d3d12 under Mullion (M1 Pro, 30 s): 2559
graphics-compiler-spill-eventsand 115 compiled shaders for the Wine process, 0 rows in the GPU counter and
shader profiler tables.perf_baseline_record: records the same programcounttimes and saves the runs as a reference in one call.- xctrace 27.1 writes
metal-resource-allocationsandtime-profilewhole and then dies with SIGTRAP (exit 133):
an export cut at a row boundary is read to its last row instead of failing.
v0.6.0
perf_baselineandperf_check: a regression reference.perf_baselinesaves copies of several equal recordings
(ideally 3 or more) as a named reference inbaselines.jsonbeside the runs, so it outlivesKEEP_RUNS, and
returns the range each number spans across them.perf_checkjudges a recording against that range:regressed
when FPS falls under it by more thanmargin_pct(default 3), GPU ms per frame rises over it, or encoders or
command buffers per frame exceed it;improvedwhen a number leaves the range the other way;sameotherwise.
The range, not one run, is the reference because 5 equal runs of drawstress d3d12 on an M1 Pro differed by 4.4 %
in FPS and 6.1 % in GPU ms per frame. Frame pacing, short encoders and GPU idle time are reported but do not
decide: they varied 13 % and 7 points between equal runs.perf_comparesays what changed in the GPU work and where: encoders and command buffers per frame, the share of
encoders undershort_us, the GPU's idle share and idle ms per frame, andlabels, each encoder label's count and
GPU ms per frame in both runs, largest change in ms per frame first. Labels compare per frame because two
recordings of different lengths do not compare by total time; a label missing from a run that holds the full 20
labels isoutside_top_20, notgone. A run summarized before 0.4.0 is named inencoders.missing_in, and the
headline numbers still compare. Shares (short encoders, GPU idle) give their change in points, without a %.- The
compare-layerprompt reportsperf_compare's table and labels instead of rebuilding them from two
perf_diagnosecalls. - Each recording names its translation layer in
layer: the Wine version, the overrides in force (environment and
the prefix's registry), the size and SHA-256 ofd3d12,d3d12core,d3d11,d3d10coreanddxgiin Wine and
in the prefix, a 12-characterfingerprintof all of it, and the program's variables (MULLION_DIAG=profile) with
paths cut to file names. Native runs say they have no layer.perf_runsshows the fingerprint and Wine;
perf_comparesays whether both runs share a layer, which DLLs differ, and that different layers compare layers,
not one change. Which copy of a DLL Wine loads is not recorded: Instruments does not keep Wine's own log. perf_record.shkeeps the caller'sWINEDLLOVERRIDES(a Mullion built forsystem32needsd3d12,...=n) and
addsmscoree=;mshtml=after it; before, it replaced them.- A prefix copy of a Direct3D DLL identical to Wine's own (Wine's first boot makes one) leaves the layer
fingerprint unchanged: the fingerprint anddifferslook at the copy Wine loads, the prefix's when it exists.
Measured on an M1 Pro: the first drawstress run on a new prefix got a different fingerprint from the next
three, with identical DLLs. - Downloads are hashed in 1 MiB blocks.
v0.5.0
workload_listandworkload_fetch: download a test program once from this project's releases, check the
SHA-256 this package pins and keep it in~/Library/Caches/metal-gpu-trace. Claude Code asks before every
download (anthropic/requiresUserInteraction).perf_recordrecords a fetched test program withworkload,apianddim.- First test program: bgfx 17-drawstress for macOS arm64 and Windows x64, built from source by
.github/workflows/workloads.yml(releaseworkloads-1). Recorded on an M1 Pro, it gives the same encoders per
frame as a local build (2 in native Metal, 7 in D3D12 under Mullion) and FPS within 4 %. compare-layerprompt: records a test program in native Metal and under a translation layer, then diagnoses and
compares both runs.
v0.4.0
perf_diagnose: says whether a recording splits its GPU work into too many short encoders, as translation layers
do, with encoders and command buffers per frame, the labels with the most GPU time and the GPU's idle time.
Defaults (4 encoders per frame, 25 µs, 25 % short) come from bgfx 17-drawstress on an M1 Pro: 7 encoders per frame
and 50 % under 25 µs under Mullion, 2 and 2 % in native Metal.- Summaries gain
encodersandgpu_idle, frommetal-gpu-intervalsandmetal-application-encoders-list.
Summaries written by older versions have neither: record again to diagnose them. - Every tool parameter has a description;
metal-gpu-trace --version. - Registry files:
server.json(MCP Registry),glama.json;CHANGELOG.md. trace_tablesandtrace_querytake a run name;perf_runssays whether each run kept its.trace
(trace_kept).- A trace without
metal-gpu-intervalsfails with a hint; summaries list other missing tables inmissing_tables. capture_summaryreturnscalls_total.- Tools carry
title,readOnlyHint,destructiveHint,idempotentHintandopenWorldHint;initialize
returns usageinstructions. - A recording's deadline grows with its length (10 s per recorded second plus 120 s), and one that overruns leaves
no files behind. perf-runs/is created only when a recording needs it. Tests run under pytest; CI on macOS with Python 3.9 and
3.13.
Workloads workloads-1
Test programs for metal-gpu-trace's workload_fetch. Built from source by the workloads workflow; BUILD.txt lists the commits.
v0.2.0
- First release on GitHub:
perf_record,perf_attach,perf_runs,perf_compare,trace_tables,
trace_query,capture_summary,capture_records,gpu_family, and the GPU family resources.