A timeline of a few frames, with the chain each present came out of (VICTORY_TIMELINE)
Diagnostics only. VICTORY_TIMELINE=<file> records three frames (or VICTORY_TIMELINE_FRAMES) after VICTORY_TIMELINE_AT seconds and writes a Chrome trace and a text summary: spans of our work, the waits and wake-ups of the title's threads (its imports) and of ours (our import table), long kernel calls on the address space, and when each submission ran on the card. The summary walks back from each present through who waited on whom. Nothing is wrapped without the variable. Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit 008de5f9ffcef132079b1af8b7f4f1c22235cee9)
This commit is contained in:
1 parent
faf5687af9
commit
7c62f5b707
25 files changed
+2506
-7
No files matched your search
@@ -78,7 +78,13 @@ impl HostPolicy {
|
||||
if !self.allows(dll) {
|
||||
return None;
|
||||
}
|
||||
imp::resolve(dll, symbol)
|
||||
let address = imp::resolve(dll, symbol)?;
|
||||
// With a timeline asked for, what threads wait with is wrapped.
|
||||
#[cfg(all(windows, feature = "diagnostics"))]
|
||||
if let ImportSymbol::Name { name, .. } = symbol {
|
||||
return Some(victory_gpu::timeline::import(name, address));
|
||||
}
|
||||
Some(address)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -774,7 +774,9 @@ fn work(scheduler: &'static Scheduler) {
|
||||
drop(lanes);
|
||||
let started = std::time::Instant::now();
|
||||
let traced = Traced::start(&job);
|
||||
let reading = victory_gpu::timeline::span("streaming: a request");
|
||||
let result = execute(&job.request);
|
||||
reading.end();
|
||||
walls_request(&job.request, &result, started);
|
||||
stream_log::request(&job, started, &result);
|
||||
if let Some(traced) = traced {
|
||||
@@ -1341,6 +1343,7 @@ fn queue(this: QueueRef, command: Command) {
|
||||
/// the pages are mapped just before, also those under addresses without a
|
||||
/// list (memory only the CPU sees).
|
||||
extern "system" fn submit(this: QueueRef) {
|
||||
let _called = victory_gpu::timeline::span("the title's DirectStorage Submit");
|
||||
// SAFETY: as above.
|
||||
let id = unsafe { &*this }.state.id;
|
||||
let Some(scheduler) = scheduler() else {
|
||||
|
||||
@@ -1065,6 +1065,7 @@ pub extern "system" fn XMemMapPhysicalPages(
|
||||
// SAFETY: the title passes `n` page numbers, or null.
|
||||
let pages = (!pages.is_null()).then(|| unsafe { std::slice::from_raw_parts(pages, n) }.to_vec());
|
||||
let mut costed = Costed::begin(Some(n));
|
||||
let _called = victory_gpu::timeline::span("the title's XMemMapPhysicalPages");
|
||||
let mut physical = physical();
|
||||
if let Some(costed) = &mut costed {
|
||||
costed.waited = costed.started.elapsed().as_nanos() as u64;
|
||||
|
||||
Reference in new issue
Block a user