submitted.tiny.behind's rounds took twice as long on car 13's tip as on car
12's (n 8059-8955 against 14742-20172 per 5 s), while its ret, the tiny
buffer's commitAndWaitUntilSubmitted, is at most about 70 us of a round.
The case now also prints the busy buffer's commit to its GPUStartTime, its
GPUStartTime to its GPUEndTime and the whole round. Those split the extra
time between the host's submission, the GPU's fills and the completions.
The lone submit was measured with a scratch probe that was never committed.
The submit probe now has the call's cases: an empty and a tiny buffer after
an idle gap, with the call's time and its start to the scheduled handler,
and a tiny buffer behind a buffer of a few milliseconds on its queue.
The -q setup now runs under the watchdog, so a queue whose command buffer
never completes prints HANG with the count made instead of hanging the run,
and newCommandQueue answering nil is reported. -s SEC holds the queues before
the cases, so several processes can keep quiet queues on one device while
another measures.
A process with many quiet queues may cost every completion something: the
kext scans each watched completion ring on every interrupt of the device's
one vector. -q N makes N more queues, runs one command buffer through each,
and keeps them for the whole run, so the cases can be compared with and
without them.
The lane had no measure of what one command buffer costs end to end: bench
times GPU-heavy work, and cb_probe only checks that completions come. The
probe times commit-only and commit-and-wait rates, a completed handler's round
trip, commit to the scheduled and completed handlers with and without an idle
gap, the same from several threads on their own queues or one they share, and
a shared event's signal from the CPU and the GPU to a waiter on each. It builds
for the guest and for Macs (make submit-probe), so one binary compares the lane
with native Metal; -v prints each case's largest samples with when they were
taken, to match a host trace.