feat(run-report): count milestones, frames, GPU and shader diagnostics #15705
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15705"
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 oneandonlydean on 2026-11-04T08:14:36Z.
What
Adds what a run observed to the run report written by #14235 (the writer): how far it got, the frames it presented, the GPU, and shader and image-format counters. Until now these sections were marked as not collected (
coveragefalse); now they are collected (coveragetrue).loaded/started(macOS entry bridge only),firstDraw(a batch that carries a recorded guest draw or dispatch was accepted by the GPU queue),firstPresentandframesPresented(guest display buffers the swapchain queue accepted), and the average frame rate between the first and last presented frame.system.gpu).quit-requested) instead ofguest-exit.DiagnosticSink.hpp), a table of function pointers installed once by the driver library; with no sink installed nothing changes.UnsupportedInstructionErrornow carries the encoding, the opcode value and the throw site.static const boolfirst.This is the third of four PRs; it depends on the writer (#14235). The fourth (recovery of a killed run) also rewrites
RunReport.cpp: whichever of the two lands second reruns the privacy sweep and kill-and-recover tests with both sets of fields. Not here: the stop kinds that name a missing function, an unsupported shader or an unsupported format when a run ends in an abort, and recovery of a run that was killed.Tested
Linux (workstation).
run_report_tests: 52 passed, 0 failed, 2 not run (no comma-decimal locale installed; the junction test is Windows only). ctest of the tests selected from this diff (CMake directories oflibc,libSceVideoOut,libSceAgcDriver,libkernel,libSceJson2and the shared-memory tests) pluspublic_headers(65),run_report*andagc_run_report*: 437 tests, 100% passed, 7 skipped by the tests themselves (video_out_flip_cpuflip_in_order,video_out_frame_dump_queue,video_out_frame_dump_wait,video_out_frame_dump_cpu_queue,video_out_telemetry_caption,pad_sdl,pad_port0: they need a display and are skipped in the same way in other builds on this machine). The newagc_run_report_shader_failuretest checks the sink: an unsupported instruction is reported with its encoding, each compile attempt is counted once as a compile or a failure (cached and uncached), and the guest-work marks behave as described;CommandBatchFailurehas new cases for the mark's lifetime. As a check that the tests pin the behaviour, taking the first-present milestone out of the frame counter makesframesandobservationsfail; with it restored they pass.Cost, report on versus off. A game-less entry (
run_report_tests --child exit, 300 runs, three rounds, medians): 1.47 ms off, 1.77 ms on, so 0.30 ms added to a run (0.25 ms of that is the writer in #14235). Per call, 2,000,000 calls each, median of 5 runs: with the report off every hook is about 0.4 ns (a null check); on:Enabled0.4 ns, frame presented 17.3 ns, milestone 14.6 ns, shader 4.6 ns, image format 24.4 ns, descriptor 22.7 ns. No title was run, so the cost on a real draw path is not measured.Not run: Windows and macOS (the platform code,
MainThreadMacOs.cpp, the Windows run of the new tests); any title, so the GPU fields,firstDrawandfirstPresenthave not been seen on a real game or on more than one GPU.Things reviewers may question
Draw.cpp, the recorder, the present path and the texture-format lookup. Each is guarded by a cachedstatic const bool; the measured per-call costs are above, but not on a real title.VulkanDevice.cpp(125 open PRs),Draw.cpp(96),Recompiler.cpp(57),Recorder.cpp(41),VideoOutDriver.cpp(8). Expect conflicts to be resolved per PR.docs/user/run-report.md, not in code, because code comments are limited to technical debt.loadedandstarted.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)