diff options
| author | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-28 23:07:49 -0400 |
|---|---|---|
| committer | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-28 23:07:49 -0400 |
| commit | 571f9b58eb8a9c102a91a5d26cd32ebae4330232 (patch) | |
| tree | 989c5032c268044452d7ad7c324b147c964227e9 /src/yuzu_cmd/yuzu.cpp | |
| parent | 808039e5806dc841a30ef7d887462635860ae291 (diff) | |
nx2: GPU-thread zone timers and an in-process sampling profiler
EDEN_NX2_GPU_PROFILE=1 times the GPU thread's stages (command parsing,
macros, draw setup by step, compute, texture uploads) and logs each
one's share of every second.
EDEN_NX2_SAMPLE=<thread names> (Windows) pauses the named threads about
600 times a second for EDEN_NX2_SAMPLE_SECONDS, walks their stacks and
writes per-function counts plus folded stacks (EDEN_NX2_SAMPLE_OUT).
Diffstat (limited to 'src/yuzu_cmd/yuzu.cpp')
| -rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index bf256766fb..ffa1876c4f 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -54,6 +54,7 @@ #endif #include "yuzu_cmd/emu_window/emu_window_sdl3_null.h" #include "yuzu_cmd/emu_window/emu_window_sdl3_vk.h" +#include "yuzu_cmd/nx2_sampler.h" #ifdef _WIN32 // windows.h needs to be included before shellapi.h @@ -246,6 +247,7 @@ extern "C" SDL_AppResult SDL_AppInit(void **appstate, int argc, char **argv) { #ifdef _WIN32 SetUnhandledExceptionFilter(WriteCrashDump); #endif + Nx2Sampler::StartFromEnvironment(); // SDL calls SDL_AppIterate back to back by default, which kept a host core at 100% polling // input; 240 Hz is plenty for input and the key script. SDL_SetHint(SDL_HINT_MAIN_CALLBACK_RATE, "240"); |
