Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions crates/xcl/src/eh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,12 @@ pub fn dump_threads() {
crate::xlog_info!("thread dump ({} threads):
{}", lines.len(), lines.join("
"));
let waits = crate::hle::waits::long_waits();
if !waits.is_empty() {
crate::xlog_info!("waits of 2 s or more (XCL_TRACE_WAITS):
{}", waits.join("
"));
}
crate::log::flush();
}
}
Expand Down
8 changes: 7 additions & 1 deletion crates/xcl/src/hle/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pub mod mfplat;
pub mod netoff;
pub mod opus;
pub mod user;
pub mod waits;
pub mod xaudio2;
pub mod xma2;
pub mod xg;
Expand Down Expand Up @@ -96,8 +97,13 @@ pub const ACPHAL: &str = "acphal.dll";
pub const GAMEINPUT: &str = "gameinput.dll";

fn build(config: &Config) -> Registry {
let mut kernel = kernelx::exports();
if waits::enabled() {
// `XCL_TRACE_WAITS`: the title's events, semaphores and waits through the tracer
kernel.extend(waits::exports());
}
let mut modules = vec![
HleModule::new(KERNELX, kernelx::exports(), &[SELF, "kernelbase.dll", "kernel32.dll", "advapi32.dll", "sechost.dll"]),
HleModule::new(KERNELX, kernel, &[SELF, "kernelbase.dll", "kernel32.dll", "advapi32.dll", "sechost.dll"]),
HleModule::new(XGAMERUNTIME, xgameruntime::exports(), &[]),
HleModule::new(D3D12X, d3d12x::exports(), &[]),
HleModule::new(XAUDIO2, xaudio2::exports(), &["xaudio2_9.dll"]),
Expand Down
Loading
Loading