Skip to content

Slay the Spire: time ARM64EC SMC invalidation stages - #22

Open
butilly wants to merge 1 commit into
mainfrom
fix/slay-the-spire-fex-smc-diagnostic
Open

butilly wants to merge 1 commit into
mainfrom
fix/slay-the-spire-fex-smc-diagnostic

Conversation

@butilly

@butilly butilly commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Game: Slay the Spire; executable: SlayTheSpire.exe; thread: 1565299506344370196.

Latest INTERMEDIATE/Proton 11 ARM64EC capture has 1814.8 ms and 1533.4 ms frames at 30% and 17% GPU utilization. Debug handoff counts 33150 handled SMC events and 1297 call-ret imbalance events. Inspected source invalidates shared buffers, thread caches and return stacks, then unprotects the page under the code mutex. Event counts do not prove which stage stalls. Existing DFmt logs provide addresses but no durations; scoped profiler hooks do not provide these stages in the captured Windows log.

Diagnostic only, gated on SlayTheSpire.exe in the ARM64EC frontend. Preserve invalidation, locking, protection, exception handling and preset semantics. Record outer thread-lock wait, interval lookup, code-lock wait, shared-buffer invalidation, thread-cache/return-stack invalidation and unprotection. Emit one FEX-SMC-TIMING summary per second while SMC is active through the Wine debug sink, even with SILENTLOG, avoiding per-fault debug output. Counters give per-window sum/max durations and event count; qpc_ms permits correlation with report frame stalls. All statistics are serialized by the existing thread-creation mutex; formatting occurs after the code mutex is released.

Validation: reviewed diff and git diff --check. CI compiles/packages. Device validation pending: compare timing peaks and sums against 1.5-3.6 second stalls before selecting a behavioral fix. Keep Proton 11 ARM64EC and INTERMEDIATE unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant