fix(agc): print the revalidate profile per 10 s window and label the cumulative profile lines #7515
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7515"
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 AlxcBTW on 2026-10-18T10:43:13Z.
What
The
[rescache] revalidate ...profile line (countRevalidateinShaderResources.cpp, added by8a69fefe1) prints every 10 s, but none of its counters was reset, so every number on it was a total since process start while the line did not say so. Two contributors read it as the count of the last 10 s and were off by an order of magnitude (about 1,100 full walks were read as 21,000 per 10 s).The line now reports the last 10 s: each counter is taken with
exchange(0, std::memory_order_relaxed)when the line is written (the calls, the time, fast/full/failed, every by-reason breakdown, and the epoch-gate, key-proof and own-refresh counters), and the text saysrevalidate (10 s):. The time column is the time spent in revalidations of the same window, soms / callsis still the mean per call. A call that races with the report lands in one window or the next; no count is lost. Nothing else changes: the same counters are counted at the same places and printed in the same order, and the line is still printed only with the profile switches that print it now. Nothing in the repository parses the line (no tool, test or document names it).Survey of the profile lines of
libSceAgcDriverandlibSceVideoOut(about 35 are written on a 10 s cadence):(10 s)orover 10 s[groupcap],[dispatch-cache](4 lines),[dispatch] driver phases,[draw] driver phases,[draw] pipelined,[poll],[packets],[present],[landwait],[validate],[dispmove],[recipe],[indirect] ... inside the device call,[barriers],[gputime],[texture-cache],[storage],[keymiss],[address],[pipecache][presync](cumulative),[address-sync](in total),[samples](cumulative),[fill]hold phases (cumulative),[dispatch-item](cumulative),[recorder](in total),[gpu] host import budget(so far)[buffers] staging(totals, thenlast 10 s)[rescache]hits line,[vk],[indirect] gpu-side,[flip],[fill-sync],[buffers]descriptor elements (labelled by the second commit); not changed:[copy],[labels],[capture],[bufferpool],[dcc],[recorder]in-place reads,[textures],[descriptors],[buffers](image mirrors, host imports)The documents do not describe these lines (only
[log]and[gputime]are described, both as windows), so the convention is taken from the lines that state their scope: 20 of them are windows, and the revalidate line sits between two of them in its file ([texture-cache] (10 s)and[keymiss] (10 s)). The unlabelled cumulative lines are not converted to windows: relabelling or converting about fifteen lines is a separate change per line family.The second commit,
fix(agc): say "cumulative" on the profile lines that count from the start, adds(cumulative)(the wording[presync],[samples]and[fill]already use) to the unlabelled lines whose counters I checked in the code to be only incremented and never read withexchange,store(0), a reset or a delta:[rescache]hits and[vk](theDispatchCounterstotals,ResourceCache::Finds/Touches, the compute pipeline counters),[indirect] gpu-side(IndirectDispatch.cpp),[flip],[fill-sync]and[buffers] descriptor elements bound. Only the text changes. Not touched, because I did not verify every counter on them:[copy],[labels],[capture],[dcc],[bufferpool],[textures],[descriptors],[buffers](image mirrors, host imports), the[recorder]in-place reads line and[resources].The third commit,
docs(agc): say which profile lines count per window and which since start, adds a section "Driver profile lines" todocs/dev/BUILD.md(after the[gputime]section) with the switch (APS5_PROFILE_DRAW), the rule for the labels, and a table of the lines whose counting I verified:[rescache] revalidate,[texture-cache]and[pipecache]per 10 s window;[rescache]hits,[vk],[indirect],[flip],[fill-sync]and[buffers] descriptor elements boundfrom the start. The other lines are not listed.Textual overlap: #6944 adds an argument to the same print statement (line 2609 on
main) for an unrelated fix; whichever merges second needs a trivial rebase. #5998 touchesShaderResources.cppand could not be compared.Tested
0d699295aplus the CI scaffolding commit; theagc_*set of the lab test filter): 563 of 563 passed. The first run (39117413946) failed to build because the report lambda took its counters as const; fixed in the head.python3 tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.pylists #6944 (same print statement, see above).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)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T11:01:54Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppL2653Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
docs/dev/BUILD.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/BUILD.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/BUILD.mdcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Dispatch/IndirectDispatch.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/BUILD.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Dispatch/IndirectDispatch.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Dispatch/IndirectDispatch.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Dispatch/IndirectDispatch.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/BUILD.mdcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppdocs/dev/BUILD.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp