perf(agc): record render passes, barriers and copies in the trace summary #18948
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18948"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Ethan-Hainline on 2026-11-12T15:29:30Z.
What
Adds a machine-readable graphics track to the trace summary (
aps5-summary.jsonl), the stage-1 instrumentation asked for on #17533: render passes, barriers and copies, per interval, next toframe_msandgpu_busy_ms_per_present.New
graphics_trackobject, all counts summed across threads:Graphics.RenderPassDraw.cpp, now viaPerformanceTrace::AmountGraphics.RenderPass.ContinuedRecorder::StartDrawPassGraphics.RenderPass.Close.<reason>Recorder::endOpenRenderPassnew-batch,command,label,samples,forced,segment,key,raw,waw,war,image,unknown-read,unknown-writeGraphics.Barrier.<class>Recorder::CountBarriersGraphics.BarrierMerged.<class>Recorder::CountMergedGraphics.Copy,Graphics.Copy.bytesCopyBufferand the two render-target image copiesPerformanceTrace::Amount(scope, amount)adds weighted counts to the existing per-thread totals, soTraceFormat::Sincealready gives each summary interval its own delta (the same pathowned_draw_countsuses).AmountchecksRecording()and drops the count when tracing is off, the same wayCountOwnedDrawdoes.Only these count scopes enter
graphics_track. The timedGraphics.Draw,Graphics.DrawWithRecipe,Graphics.SubmitandGraphics.Waitscopes stay intop_phases_ms_per_frame, so paired runs do not lose them.Documented in
docs/dev/BUILD.md; no production behavior changes.Tested
agc_performance_tracepasses: the exact summary line now includesgraphics_track, and the new case asserts thatGraphics.Barrier.drawandGraphics.Copy.bytesare summed across threads (4+3 = 7 and 65536), thatGraphics.RenderPassis counted, and that a timedGraphics.Draw(5 ms) still lands intop_phases_ms_per_frameand is absent fromgraphics_track.libSceAgcDriverandagc_performance_trace_testsbuild on Windows (WinLibs GCC 16.2.0 UCRT, Release).APS5_TRACE_*unset,CountBarriers/CountMergedkeep their previous early return;Amountreturns after theRecording()check, like the existing weighted counts.Companion tool changes render the object per interval in
tools/trace_digest.py(#18949) and compare its per-present rates intools/performance_compare.py(#18955).Checklist
main; one topic per PR