2 Commits

Author SHA1 Message Date
chrg6
cae09a2bcd Add floor_watch: hardware watchpoints on the floor the scan finds log which game code reads and writes it, at 60 fps and again at 120 fps or more.
floor_watch.c takes up to twelve of the floor scan's survivors (the platform's rigid body controller unit first, then one per object at the pivot's height), watches them four at a time through the debug registers on every thread (platform.h plat_watch_set, Windows only), counts each access's call chain in a lock-free table and logs the chains with the executable's symbol names after each pass. prof_syms gains a callback form for that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 07:08:49 -05:00
Tobim6
f3a9d2967f Profiler: name the exe's addresses from its own symbol table, and sample the replay thread alone.
A NX2NAVI_PROFILE profile needed the link map to name its Rips, and the launcher's builds keep none. A MinGW link keeps
the COFF symbol table in the exe, so prof_sampler_write now reads it (runtime/prof_syms.c, plain file reads) and appends
`sym <address> <function>+<offset>` for every exe address in the Rip and chain lists. NX2NAVI_PROFILE_REPLAY=1 samples
only the replay thread: with NX2NAVI_REPLAY_ASYNC=1 the render thread spends 98% of a 37 ms frame waiting, and the
replay thread (22 ms a frame recording Vulkan commands) is the one to look at.

(cherry picked from commit 9d3126ca780d7f0f0b91468d42b8ee70572747c8)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 16:22:00 +01:00