From f4e86d4c3683225fd65fb72e56e4f16fce71bc53 Mon Sep 17 00:00:00 2001 From: XairRrR Date: Mon, 2 Nov 2026 19:16:41 +0100 Subject: [PATCH] docs(tracing): say APS5_TRACE_USLEEP counts sceKernelUsleep calls TRACING.md and ENVIRONMENT.md said APS5_TRACE_USLEEP reports every 2,000 usleep calls. Only sceKernelUsleep_nid_postfix calls TraceSleep. The guest usleep export sleeps through CancellableSleep and is never counted. sceKernelUsleep_nid_postfix is also called by sceNetUsleep and by the APS5_TRACE_TIMERS measurement, so those calls are counted too, under a libSceNet or libkernel address. Both rows now name sceKernelUsleep, list the internal callers and say that guest usleep calls are not counted. AI-assisted: yes --- docs/dev/ENVIRONMENT.md | 2 +- docs/dev/TRACING.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/dev/ENVIRONMENT.md b/docs/dev/ENVIRONMENT.md index 13ec47f858..eb4416d700 100644 --- a/docs/dev/ENVIRONMENT.md +++ b/docs/dev/ENVIRONMENT.md @@ -662,6 +662,6 @@ The code reads environment names through `getenv`, `IsEnvironmentSet`, `kibSetti | `APS5_TRACE_MEMORY` | presence | `core/libs/prx/libkernel/DirectMemory/DirectMemory.cpp` | | logs direct-memory map, remap, protect, unmap and physical allocation operations | | `APS5_TRACE_SYNC` | presence | `core/libs/prx/libkernel/EventFlag/src/EventFlag.cpp` | | logs event-flag and semaphore operations | | `APS5_TRACE_TIMERS` | presence | `core/libs/prx/libkernel/Time/Time.cpp` | | on Windows, runs a timed-wait selftest at startup and prints mean, p50 and max latencies | -| `APS5_TRACE_USLEEP` | presence | `core/libs/prx/libkernel/Time/Time.cpp` | | reports every 2000 usleep calls the guest call sites that sleep most | +| `APS5_TRACE_USLEEP` | presence | `core/libs/prx/libkernel/Time/Time.cpp` | | reports every 2000 `sceKernelUsleep` calls the call sites that sleep most, including calls through `sceNetUsleep` and the `APS5_TRACE_TIMERS` measurement; guest `usleep` calls are not counted | | `APS5_TRACE_WAITS` | presence | `core/libs/prx/libkernel/Time/Time.cpp` | | aggregates blocking waits per guest call site and prints the longest-waiting sites every 3 s | diff --git a/docs/dev/TRACING.md b/docs/dev/TRACING.md index b9a5f8aa59..c932f1aac5 100644 --- a/docs/dev/TRACING.md +++ b/docs/dev/TRACING.md @@ -21,7 +21,7 @@ Set a switch before starting the emulator. Unless noted, any value enables it. M | `APS5_TRACE_SYNC` | Event-flag operations and their wait and wake results. | | `APS5_TRACE_TIMERS` | Timing measurements for the host wait primitives used by the emulator. | | `APS5_TRACE_UDS` | Universal Data System events posted to a context, and the trophy title data it cannot find. | -| `APS5_TRACE_USLEEP` | Every 2,000 guest `usleep` calls, with caller addresses and requested delays. | +| `APS5_TRACE_USLEEP` | Every 2,000 `sceKernelUsleep` calls, the call sites that sleep most, with their call counts and requested delays. Calls made through `sceNetUsleep` and by the `APS5_TRACE_TIMERS` measurement are counted too, under a libSceNet or libkernel address. Guest `usleep` calls are not counted. | | `APS5_TRACE_VIDEODEC` | Video decoder API calls and decode results. | | `APS5_TRACE_WAITS` | Blocking waits aggregated by guest call site, including timeout counts and longest waits, every three seconds. |