Recording: a lock a descriptor slot, a thread's own answers about buffers, tables left as they are when nothing changed

Timeline waits-1 (dorm, 78 ms): the title's render thread stands 20 to 30 ms
a frame at one recording job and the rest at others; recording is the
critical path, and our list calls are 95 % of it. Profile waits-1, the five
recording threads: 21 % contended locks, 11 % HostHeap::keep, 17 % readable,
7 % the look-up of buffers, 8 % clocks and counters of ours.

VICTORY_QUICK_FIND=0 and VICTORY_READY_ONCE=0 go back; counters of the
diagnostics by thread, a coarse clock for what is noted per texture and slot.
VICTORY_AB=<s>,<switches> turns switches on and off while the title runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
localandClaude Opus 5.5 committed 2026-11-25 08:14:21 -06:00
1 parent 7c62f5b707
commit 66c935eac2
9 files changed
+405 -61

No files matched your search

+27
View File
@@ -15,6 +15,33 @@ pub(crate) fn on(name: &str) -> bool {
value_is_on(std::env::var_os(name).as_deref())
}
/// A switch that is on unless its variable is `0`, read once; with
/// `VICTORY_AB` naming it (diagnostics builds, `crate::ab`), on and off while
/// the title runs.
#[cfg(windows)]
#[macro_export]
#[doc(hidden)]
macro_rules! toggled {
($name:literal) => {{
#[cfg(feature = "diagnostics")]
{
static BIT: std::sync::OnceLock<Result<bool, u32>> = std::sync::OnceLock::new();
match BIT.get_or_init(|| match $crate::ab::bit($name) {
Some(bit) => Err(bit),
None => Ok(std::env::var_os($name).is_none_or(|v| v != "0")),
}) {
Ok(on) => *on,
Err(bit) => $crate::ab::on(*bit),
}
}
#[cfg(not(feature = "diagnostics"))]
{
static ON: std::sync::OnceLock<bool> = std::sync::OnceLock::new();
*ON.get_or_init(|| std::env::var_os($name).is_none_or(|v| v != "0"))
}
}};
}
#[cfg(test)]
mod tests {
use super::value_is_on;