Texture pass: tell its "rest" apart (5-second line), waits for its locks
The pass over textures picked by index logged 846 of 1,408 ms (cutscene, coolfox-20261126-223059) as "the rest". A second line now splits it: telling the queue what came of each slot, reading the slots' records, fingerprints after uploads and same-looks, handing first uploads to the copy queue ahead, slots shown after their upload / flipped / made at once, asking whether a staged texture's memory is all there, other checks; the waits for the queue's and the views table's locks (by the pass and by other threads, counted only when the lock was held: try_lock first); the work before the loops (not in "all"); passes by kind (frame, early, bake) with their time and how many stopped at their time or bytes; and the slots taken by outcome. The existing parts are summed in nanoseconds now: in microseconds each short call lost what it took below the next whole one. The pass reads the slot's view once for its placed and object checks (it read it twice). pass_costs (ignored test, a measurement): on this PC asking whether 1/4/16 MB of resident memory is all there takes 18/23/111 us, 0.9-15 ms when the pages were trimmed from the working set; a fingerprint 3-7 us. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
2f81d0c85b
commit
0b651fa9a8
5 files changed
+323
-80
No files matched your search
@@ -9007,7 +9007,12 @@ impl Meter {
|
||||
);
|
||||
}
|
||||
let [looks, mapped, same, staged, all, made, views] =
|
||||
[0, 1, 2, 3, 4, 5, 6].map(|i| crate::draw::HEAP_TEXTURE_MICROS[i].swap(0, Ordering::Relaxed) / 1000);
|
||||
[0, 1, 2, 3, 4, 5, 6].map(|i| crate::draw::HEAP_TEXTURE_NANOS[i].swap(0, Ordering::Relaxed) / 1_000_000);
|
||||
let rest = all.saturating_sub(looks + mapped + same + staged + made + views);
|
||||
let parts = crate::draw::HEAP_TEXTURE_REST.each_ref().map(|n| n.swap(0, Ordering::Relaxed) / 1_000_000);
|
||||
let waits = crate::descriptor::LOCK_WAITS.each_ref().map(|n| n.swap(0, Ordering::Relaxed) / 1_000_000);
|
||||
let passes = crate::draw::HEAP_TEXTURE_PASSES.each_ref().map(|n| n.swap(0, Ordering::Relaxed));
|
||||
let slots = crate::draw::HEAP_TEXTURE_SLOTS.each_ref().map(|n| n.swap(0, Ordering::Relaxed));
|
||||
if all > 0 {
|
||||
tracing::info!(
|
||||
"the pass over textures picked by index, in the last 5 seconds: {all} ms in all, of them {looks} ms looking \
|
||||
@@ -9020,6 +9025,41 @@ impl Meter {
|
||||
crate::draw::HEAP_TEXTURE_BYTES.load(Ordering::Relaxed) >> 20
|
||||
);
|
||||
}
|
||||
if all > 0 || parts[7] > 0 {
|
||||
let [queue, records, prints, ahead, shown, whole, checks, before] = parts;
|
||||
let [n_frame, n_early, n_bake, t_frame, t_early, t_bake, at_time, at_bytes] = passes;
|
||||
tracing::info!(
|
||||
"the pass over textures picked by index, its rest in the last 5 seconds: {queue} ms telling the queue \
|
||||
what came of each slot, {records} ms reading the slots' records, {prints} ms fingerprints after uploads \
|
||||
and looks that found the host copy the same, {ahead} ms handing first uploads to the copy queue ahead, \
|
||||
{shown} ms slots shown after their upload, flipped or made at once, {whole} ms asking whether a staged \
|
||||
texture's memory is all there, {checks} ms other checks, {} ms not told apart; waited for locks: the \
|
||||
queue's {} ms by the pass ({} ms by other threads), the views' {} ms by the pass ({} ms by other threads); \
|
||||
{before} ms before the passes' loops (not in the line above); passes: {n_frame} the frame's ({} ms), \
|
||||
{n_early} early ({} ms), {n_bake} before bakes ({} ms), {at_time} stopped at their time, {at_bytes} at their \
|
||||
bytes; slots taken {}: {} looked at again and unchanged, {} memory not there, {} no more of it there, \
|
||||
{} nothing to bring up to date, {} held back for room, {} the same as their host copy, {} uploaded \
|
||||
ahead, {} uploaded in the pass's list, {} read through tables",
|
||||
rest.saturating_sub(queue + records + prints + ahead + shown + whole + checks),
|
||||
waits[0],
|
||||
waits[1],
|
||||
waits[2],
|
||||
waits[3],
|
||||
t_frame / 1_000_000,
|
||||
t_early / 1_000_000,
|
||||
t_bake / 1_000_000,
|
||||
slots[0],
|
||||
slots[1],
|
||||
slots[2],
|
||||
slots[3],
|
||||
slots[4],
|
||||
slots[5],
|
||||
slots[6],
|
||||
slots[7],
|
||||
slots[8],
|
||||
slots[9],
|
||||
);
|
||||
}
|
||||
}
|
||||
if crate::resource::held_only() {
|
||||
let [copies, bytes, grown, whole] = [0, 1, 2, 3].map(|i| crate::resource::HELD[i].load(Ordering::Relaxed));
|
||||
|
||||
Reference in new issue
Block a user