Flow · Diagram Design
Three ways to read a recording, and where each one stops
Three ways to read a recording, and where each one stops
Three rows of three boxes, each a flow from left to right: reading a .trace with xctrace, reading a .gputrace without Xcode, and exporting a run's frames table to a Chrome trace file, with an accent box in each row marking where that way stops.
.trace · read with xctrace
.gputrace · no Xcode needed
frames table · no .trace needed
1 · Find the trace
2 · Export one table
3 · Filter, then rows
a run name, or a path
in METAL_TRACE_READ
one xctrace export,
to a temp XML
pid keeps one process
a page of 500 rows
no .trace folder:
FileNotFoundError
xctrace fails:
RuntimeError
traces.py:98-101
perf_report.py:49-66
traces.py:92-114
1 · Resolve the bundle
2 · Split into records
3 · Count, diff, list
in METAL_TRACE_OUT or
METAL_TRACE_READ
reads the whole file
[size][id] per record
summary: top 100 calls
diff, records: 1 page
size under 8 or past
the end: ValueError
nothing is guessed
paths.py:17-22
gputrace_read.py:48-60
gputrace_read.py:72-141
1 · Find the frames
2 · One slice a frame
3 · Write the file
<run>.frames.csv.gz
or .csv in OUT
ts, dur: microseconds
gpu times as args
<run>.chrome-trace in
the runs folder
none: ToolError,
record it again
traces.py:14-17
traces.py:18-27
traces.py:28-30
every failure comes back as error text: worker.py:165-168
accent box: where that way stops