Commit Graph
14 Commits
Author SHA1 Message Date
MarcZX10 1eb3a8cf3f docs: list the APS5_TRACE_UDS switch
libSceNpUniversalDataSystem and libSceNpTrophy2 read it and print [uds]
lines to stderr, but the tracing guide did not list it.
2026-10-27 20:26:06 +00:00
Celegans12 2801497e0c feat(tools): split the periodic reports of an APS5_AB run by phase
An APS5_AB run interleaves phases A and B, and every periodic report
covers the time since the previous report of its kind, so its numbers
need sorting before A and B can be compared. tools/ab_split.py reads
the [ab] lines and counts a [present], [gputime], [draw] pipelined or
[syncwait] report for a phase only when its whole span lies inside the
phase after its settled line. It prints presents per 10 s and frame
time per phase, GPU busy and idle time per frame, GPU time per present
(also per --program key and --class), committer, drain and hook-wait
times, the A and B means, and each B phase against the mean of its
neighbouring A phases, which cancels a linear drift.

AI-assisted: yes
2026-10-26 12:26:29 +01:00
Celegans12 3cf8170ff8 feat(agc): toggle runtime switches in alternating phases of one run
Two runs of the same scene drift apart by more than many effects worth
measuring. APS5_AB=<seconds>:<switch>[+...] alternates phase A (switches
as the environment sets them) and phase B (the listed switches toggled)
at flip packets, under the GPU mutex after the draw pipeline drained,
and prints "[ab] phase A|B <k> begins/settled at present <n> (t <s> s)".
APS5_AB_START (a flip count, or <n>s) delays the first phase and
APS5_AB_SETTLE (default 2 s) marks when a phase's reports are clean.
Switches live in a registry (RuntimeSwitches) of relaxed atomics that
start as the environment sets them; APS5_NO_BARRIER_BATCH is the first,
since every elision it gates is decided per barrier. Any other name
fails the first flip. Without APS5_AB nothing changes.

AI-assisted: yes
2026-10-26 12:26:04 +01:00
Adrià FranchandClaude Sonnet 5.5 44ea38fc23 fix(relinker): align the macOS import trace stack and trace only executable segments
Save r12 in the entry walk so TraceImport_nid_no_patch is called with an aligned stack, record only executable Mach-O segments in the module map, and make the test hook check the alignment.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 18:37:39 +01:00
Radu Ursache 66ca5c0442 feat(relinker): trace function imports on macOS
Walk each macOS function import before the guest entry and pass it through TraceImport_nid_no_patch, as Linux and Windows already do. An x86-64 libc build records the call and prints it on SIGABRT.
2026-10-25 18:37:23 +01:00
Adrià 7b7d445bfb Merge pull request #9439 from milescoviello/feat/trace-calls-file
feat(libc): write the called imports to APS5_TRACE_CALLS_FILE every 10 seconds
2026-10-25 17:42:50 +01:00
milescovielloandClaude Opus 5.5 a938dd8f20 feat(libc): write the called imports to APS5_TRACE_CALLS_FILE every 10 seconds
A traced run that ends without a crash or an abort never reports which
imports it called. With APS5_TRACE_CALLS_FILE set, the first traced import
starts a thread that rewrites that file every 10 seconds with every import
called so far, most called first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 00:15:39 +00:00
MarcZX10 c443b512c2 docs(agc): describe label trace packet coverage 2026-10-21 16:33:58 +00:00
Ishmam Ahmed 78634fb0a9 feat(relinker): support --trace-imports for Linux output
The Linux entry stub now passes each traced import through libc.prx's
TraceImport_nid_no_patch before it calls the guest entry, and stores the
returned thunk in the import's slot. The same imports are traced as on
Windows: functions bound through a PLT slot or a GOT slot, without an
addend, and not weak. TraceImport_nid_no_patch is bound eagerly through
an added GLOB_DAT relocation, so a libc.prx without it fails at load.
Each slot's page is made writable with mprotect first, so slots inside a
PT_GNU_RELRO range can be replaced.

--trace-imports now requires libc.prx among the libraries on Linux too,
and is refused with --macos.
2026-10-19 22:56:03 +01:00
Adrià 965dc2d78c Merge pull request #7298 from eliyarson/feat/videoout-telemetry
feat(videoout): write pad and present telemetry to APS5_VIDEOOUT_TELEMETRY_DIR
2026-10-19 20:40:04 +02:00
Eli Yarson b8607f4ced feat(videoout): write pad and present telemetry to APS5_VIDEOOUT_TELEMETRY_DIR
APS5_VIDEOOUT_TELEMETRY_DIR=<directory> appends one JSON object per line to <directory>/videoout.jsonl: a contract line for the run (commit and pid), a pad line whenever the published pad state changes in its buttons, sticks, L2 or R2, a present line after the first present and every 30 after that with the count and rate the window title shows, and a drops line with the number of lines the writer discarded, reported every ten seconds while it grows and once at a normal exit. A bounded queue of 4096 lines and one writer thread batch the file, so neither the present nor the input path waits for it; a pad change that the full queue refused stays pending for a later publish, and the frame count moves from UpdateTitle's function-static to DisplayWindow so the input path can name the present it belongs to.

Without the variable no file is opened and no thread is started: a present or an input update costs one call that checks a guard variable and returns null.
2026-10-19 15:27:49 +02:00
MarcZX100 f572ca8a04 chore(agc): tag dispatch IO traces with queue origin 2026-10-17 04:38:23 +00:00
MarcZX100 99d4d230a9 docs(dev): sync trace switches with current code 2026-10-15 14:29:57 +00:00
MarcZX100 6603a9d096 docs(dev): list tracing environment switches 2026-10-15 14:29:10 +00:00