Repository navigation
Document the APS5_PROFILE_DRAW output and add a log digest #1286
fisherjoey
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
APS5_PROFILE_DRAWis read at 156 places in 46 files, and its periodic reports are the main way to measure a performance change:[present],[packets],[lock],[dispatch],[recipe],[rescache],[textures],[draw-cache],[dispatch-cache],[buffers]and others. None of it is documented; neither the variable nor any of the line families appear indocs/. What each field means (window length, per queue or total, cumulative or per window) has to be read from the code that prints it.Pull requests compare these lines by hand. 8 of the 62
perfpull requests quote profiler output in the description or comments (for example #157, #401, #858, #1193), each with its own excerpt and layout. A profiled run of one title in our tests writes 38 to 62 MB of log.Proposal
docs/dev/PROFILING.md:APS5_PROFILE_DRAWandAPS5_PROFILE_GPUturn on and what they cost;bpftrace: the driver libraries keep their symbols, so probes can be written against names (uprobe:<lib>:AgcDriver::...) and resolved withnm -Cinstead of hard-coded offsets, which change with every build.tools/profile_summary.py LOG [LOG2]. It reads a profiled log and prints median, min and max per 10 s window for each family. With two logs it prints them side by side with deltas, as a table that can be pasted into a pull request. Time windows only; it knows nothing about specific titles.What we have
A parser for these line families (about 700 lines of Python) and summary and diff commands built on it, which we use for every profiled run. It splits runs by markers from one title, so the upstream version would drop that part and keep the parsing and the table.
Questions
PROFILING.mdas a pull request? If new files underdocs/dev/are not wanted, would a section inBUILD.mdorARCHITECTURE.mdwork?tools/welcome, given that it has to follow format changes in the driver? A test against a sample log would catch that.AI-assisted: yes
All reactions