Repository navigation
Reference for the APS5_* environment variables #1284
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
main(df16c4c) reads 319 distinctAPS5_*names throughgetenv, on 444 lines in 92 files undercore/. A few more go throughIsEnvironmentSet,kibSettingandMaskFromEnvironment. By prefix: 123 areAPS5_NO_*switches, 40APS5_TRACE_*, 12APS5_DUMP_*. 251 are read as presence checks (!= nullptr); the rest take a number or a string.Two of them are documented:
APS5_PIPELINE_STATSindocs/dev/BUILD.mdandAPS5_COARSE_TIMED_WAITSinTechnicalDebt.md. Code comments are not allowed, so the call site doesn't say what a variable does or what its default is. Finding the right one means reading the code. Examples from our own debugging: the 6144 default ofAPS5_HOST_IMPORT_MIB,APS5_TEXTURE_CACHE_MIB, and the fact thatAPS5_DUMP_TARGETSdumps only non-resident targets unlessAPS5_NO_RESIDENT_TARGETS=1is set.Proposal
docs/dev/ENVIRONMENT.md: one table per library with name, kind (presence, integer, string), default, source file and a one-line description. The descriptions live in the doc, since they can't go in the code.tools/env_reference.py: lists everyAPS5_*name the code reads (getenvand the helpers above), with its file and kind.--checkcompares that list with the table and prints names that are missing from the doc or no longer read.tools/check_conventions.pyruns the same check, so a pull request that adds a newgetenv("APS5_...")also adds a row, and one that removes the last read removes the row. No new workflow.The first pull request would add the doc with all current names and the check. If writing ~320 descriptions in one go is too much to review, the first one can cover the generated columns plus descriptions for the driver (
libSceAgcDriver), and the rest follow per library.What we have
A script that produces the name, file:line and kind list from
git grep. The descriptions are not written yet. We would write them from the code and mark the ones we can't settle from the code alone for review.Questions
ENVIRONMENT.mdacceptable, or should it be a section ofBUILD.mdnext toAPS5_PIPELINE_STATS?APS5_*CMake options (APS5_ENABLE_TIMING_LOG,APS5_AGC_CREATE_LOG) stay inBUILD.mdonly?AI-assisted: yes
All reactions