docs(dev): list tracing environment switches #5854

Merged
MarcZX10 merged 2 commits from upstream-pr/5854 into main 2026-10-16 18:29:11 +00:00
MarcZX10 commented 2026-10-14 13:51:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-14T13:51:46Z.


What

Add a developer reference for the runtime APS5_TRACE_* switches, grouped by subsystem with a short description of their output. Link to the existing detailed guides for performance captures and imported-library call traces. This is the trace-switch documentation topic requested in #3815 and separated by a maintainer from the timestamp and thread-name topics.

Tested

  • Linux: python3 tools/check_conventions.py --base upstream/main passed.
  • git diff --cached --check passed.
  • Documentation only; no build or runtime tests run.

Checklist

  • Based on current main; no other open PR implements this documentation
  • One topic per PR
  • No code comments added
  • No unimplemented exports or silent stubs changed
  • No investigation notes or images added
  • No third-party code added
  • Generic documentation
  • Depends on: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (Codex); author responsible for the content
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4858941763 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5854). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-14T13:51:46Z. --- ### What Add a developer reference for the runtime `APS5_TRACE_*` switches, grouped by subsystem with a short description of their output. Link to the existing detailed guides for performance captures and imported-library call traces. This is the trace-switch documentation topic requested in #3815 and separated by a maintainer from the timestamp and thread-name topics. ### Tested - Linux: `python3 tools/check_conventions.py --base upstream/main` passed. - `git diff --cached --check` passed. - Documentation only; no build or runtime tests run. ### Checklist - [x] Based on current `main`; no other open PR implements this documentation - [x] One topic per PR - [x] No code comments added - [x] No unimplemented exports or silent stubs changed - [x] No investigation notes or images added - [x] No third-party code added - [x] Generic documentation - [x] Depends on: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes (Codex); author responsible for the content
fma-rc commented 2026-10-14 20:49:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-14T20:49:11Z.


One row names a switch that doesn't exist: APS5_TRACE_BINDLESS appears nowhere in the source on main. The closest existing switch is APS5_TRACE_IMAGE_TABLE, read in ResourceMaterializer.cpp, which the table does not list yet.

APS5_TRACE_EVENTS (PerformanceTrace.cpp) is also missing; BUILD.md already documents it under the performance trace, so a line pointing there would keep the list complete.

I compared the table with every "APS5_TRACE_*" string under core/; the other names all exist.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6178139363 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5854#issuecomment-6178139363). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-14T20:49:11Z. --- One row names a switch that doesn't exist: `APS5_TRACE_BINDLESS` appears nowhere in the source on `main`. The closest existing switch is `APS5_TRACE_IMAGE_TABLE`, read in `ResourceMaterializer.cpp`, which the table does not list yet. `APS5_TRACE_EVENTS` (`PerformanceTrace.cpp`) is also missing; `BUILD.md` already documents it under the performance trace, so a line pointing there would keep the list complete. I compared the table with every `"APS5_TRACE_*"` string under `core/`; the other names all exist.
adriadam10 commented 2026-10-15 13:44:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-15T13:44:12Z.

Review: CHANGES_REQUESTED


Compared every APS5_TRACE_* name in the table with the strings read in the source on current main:

  • docs/dev/TRACING.md:31: APS5_TRACE_BINDLESS is not read anywhere. Remove the row; the existing switch for that area is APS5_TRACE_IMAGE_TABLE (ResourceMaterializer.cpp:311).
  • Missing switches that exist: APS5_TRACE_IMAGE_TABLE, APS5_TRACE_DRAW_CACHE (DrawCacheStatistics.cpp:8), APS5_TRACE_DRAW_PROGRAMS (Draw.cpp:158, documented in BUILD.md "Performance trace") and APS5_TRACE_EVENTS (BUILD.md "Performance trace"). The last two can be a row pointing at BUILD.md, like the other performance switches.

The other names and the two links resolve. Happy to look again once the list matches the source.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5534099767 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5854#pullrequestreview-5534099767). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-15T13:44:12Z. **Review:** CHANGES_REQUESTED --- Compared every `APS5_TRACE_*` name in the table with the strings read in the source on current `main`: - `docs/dev/TRACING.md:31`: `APS5_TRACE_BINDLESS` is not read anywhere. Remove the row; the existing switch for that area is `APS5_TRACE_IMAGE_TABLE` (`ResourceMaterializer.cpp:311`). - Missing switches that exist: `APS5_TRACE_IMAGE_TABLE`, `APS5_TRACE_DRAW_CACHE` (`DrawCacheStatistics.cpp:8`), `APS5_TRACE_DRAW_PROGRAMS` (`Draw.cpp:158`, documented in BUILD.md "Performance trace") and `APS5_TRACE_EVENTS` (BUILD.md "Performance trace"). The last two can be a row pointing at BUILD.md, like the other performance switches. The other names and the two links resolve. Happy to look again once the list matches the source.
fma-rc commented 2026-10-15 14:01:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-15T14:01:34Z.


@MarcZX100 I checked the review against current main (0dab493f5) and all five points hold. In case it saves you time, commit c860e7499 on fma-rc:docs/trace-switches (on top of your branch) removes APS5_TRACE_BINDLESS, adds APS5_TRACE_IMAGE_TABLE and APS5_TRACE_DRAW_CACHE to the GPU table, and adds APS5_TRACE_DRAW_PROGRAMS and APS5_TRACE_EVENTS to the performance table pointing at BUILD.md. With it, the names in the file and the names the source reads are the same set (APS5_TRACE_COMMIT and APS5_TRACE_DIRTY are build-time macros, not switches).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6193923970 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5854#issuecomment-6193923970). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-15T14:01:34Z. --- @MarcZX100 I checked the review against current `main` (0dab493f5) and all five points hold. In case it saves you time, commit c860e7499 on `fma-rc:docs/trace-switches` (on top of your branch) removes `APS5_TRACE_BINDLESS`, adds `APS5_TRACE_IMAGE_TABLE` and `APS5_TRACE_DRAW_CACHE` to the GPU table, and adds `APS5_TRACE_DRAW_PROGRAMS` and `APS5_TRACE_EVENTS` to the performance table pointing at BUILD.md. With it, the names in the file and the names the source reads are the same set (`APS5_TRACE_COMMIT` and `APS5_TRACE_DIRTY` are build-time macros, not switches).
MarcZX10 commented 2026-10-15 14:30:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-15T14:30:18Z.


Updated and rebased onto current main. I removed the obsolete APS5_TRACE_BINDLESS row and added APS5_TRACE_IMAGE_TABLE, APS5_TRACE_DRAW_CACHE, APS5_TRACE_DRAW_PROGRAMS, and APS5_TRACE_EVENTS. I compared the documented switches against the runtime getenv("APS5_TRACE_…") uses in current core; APS5_TRACE_COMMIT and APS5_TRACE_DIRTY are generated build metadata, not user switches. Local validation: python3 tools/check_conventions.py --base upstream/main and python3 -m unittest tools.tests.test_check_conventions_doc_links pass.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6194535476 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5854#issuecomment-6194535476). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-15T14:30:18Z. --- Updated and rebased onto current `main`. I removed the obsolete `APS5_TRACE_BINDLESS` row and added `APS5_TRACE_IMAGE_TABLE`, `APS5_TRACE_DRAW_CACHE`, `APS5_TRACE_DRAW_PROGRAMS`, and `APS5_TRACE_EVENTS`. I compared the documented switches against the runtime `getenv("APS5_TRACE_…")` uses in current core; `APS5_TRACE_COMMIT` and `APS5_TRACE_DIRTY` are generated build metadata, not user switches. Local validation: `python3 tools/check_conventions.py --base upstream/main` and `python3 -m unittest tools.tests.test_check_conventions_doc_links` pass.
MarcZX10 commented 2026-10-16 16:15:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T16:15:52Z.


@adriadam10 The current head removes APS5_TRACE_BINDLESS and includes the missing APS5_TRACE_IMAGE_TABLE, APS5_TRACE_DRAW_CACHE, APS5_TRACE_DRAW_PROGRAMS, and APS5_TRACE_EVENTS rows. Eligibility and conventions pass on this head. Could you recheck the updated list when convenient?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6219736735 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5854#issuecomment-6219736735). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T16:15:52Z. --- @adriadam10 The current head removes `APS5_TRACE_BINDLESS` and includes the missing `APS5_TRACE_IMAGE_TABLE`, `APS5_TRACE_DRAW_CACHE`, `APS5_TRACE_DRAW_PROGRAMS`, and `APS5_TRACE_EVENTS` rows. Eligibility and conventions pass on this head. Could you recheck the updated list when convenient?
adriadam10 commented 2026-10-16 18:29:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T18:29:03Z.

Review: APPROVED


Compared the APS5_TRACE_* names in docs/dev/TRACING.md with the strings read under core/ on current main: 51 names on each side, same set. APS5_TRACE_BINDLESS is gone, the four missing switches are listed, and both links resolve. Merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5552085575 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5854#pullrequestreview-5552085575). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-16T18:29:03Z. **Review:** APPROVED --- Compared the `APS5_TRACE_*` names in `docs/dev/TRACING.md` with the strings read under `core/` on current `main`: 51 names on each side, same set. `APS5_TRACE_BINDLESS` is gone, the four missing switches are listed, and both links resolve. Merging.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!5854
No description provided.