Commit Graph
111 Commits
Author SHA1 Message Date
Adrià 1a7a3dfd4f Merge pull request #9572 from JJenkx/windows/symbolize-sampler-stacks
feat(tools): symbolize the Windows samplers' stacks
2026-10-25 20:18:58 +01:00
Adrià bd0389635d Merge pull request #9471 from EnriqueDev2002/docs/macos-relinker-prerequisites
docs(build): add macOS relinker prerequisites
2026-10-25 16:16:28 +01:00
Dean 74986c28bd Merge pull request #10559 from xTRACKGOD/fix/trace-digest-interval-identity
fix(tools): detect host and title changes in interval digests
2026-10-25 19:15:31 +13:00
xTRACKGOD 8ee49632b0 fix(tools): detect host and title changes in interval digests 2026-10-24 15:17:58 +05:30
Adrià 5d3ab7791d Merge pull request #9016 from dantdmdarealguy/docs/build-python-launcher-windows
docs(build): run the Python tools with python or py -3 on Windows
2026-10-24 11:35:41 +02:00
Adrià 7be57380e3 Merge pull request #8619 from mantavisual/docs/build-antivirus-relinker-test-temp
docs(build): point the antivirus note at the relinker tests' test-temp
2026-10-24 11:31:10 +02:00
Adrià fe204e1a8d Merge pull request #8568 from mantavisual/docs/build-windows-script-policy
docs(build): note the Group Policy script block on libusb's version step
2026-10-24 11:26:29 +02:00
SamandClaude Opus 5.5 a70e108a03 fix(agc): capture memory committed during the frames and count flips per thread
The recorder took its ranges once, at the snapshot, so a title that
committed memory during the captured frames replayed submissions from
memory the capture never had. Each memory delta now adds the allocations
the registry gained since the last one as new ranges with their nonzero
64 KiB blocks, and the header counts them as late_ranges.

A submission ended a captured frame when the driver's flip count changed
while it was being submitted, and the count was global, so a submission
that overlapped another thread's flipping one ended the frame as well.
The count is now kept per thread.

agc_driver_frame_replay copies its second frame from a block committed
during the capture, and agc_driver_frame_capture_eop checks that a flip
submitted on another thread leaves this thread's count unchanged; both
fail without the fix.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:09:44 +02:00
SamandClaude Opus 5.5 268525d612 fix(agc): keep replayed memory, tokens and outputs faithful to the capture
- Order memory deltas and video output registration before the next
  recorded call, and serialize the deadlock breaker with delta application
- Capture the blocks holding shader code with each shader delta
- Reserve explicit and automatic EOP flip tokens under one lock
- Record video output unregistration so replay can close and reopen a handle
- Clear already mapped ranges before restoring the snapshot so elided zero
  blocks replay as zero

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:09:44 +02:00
SamandClaude Opus 5.5 dbe034fdf8 fix(agc): end a captured frame once per EOP flip
An EOP flip reservation also ended a frame, and so did the submission
whose EOP release carries the reserved token, so a title flipping with
EOP releases counted each displayed frame twice: a capture of N frames
stopped after about N/2 and could start between the reservation and
the submission that flips. The reservation is now only recorded; a
frame ends at a CPU flip or at a submission that flips.

agc_driver_frame_capture_eop reserves and submits six EOP flips with
APS5_FRAME_CAPTURE_FRAMES=3 and checks that the capture starts after
the first flipping submission and holds three frames of one reservation
and one submission each.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:09:44 +02:00
SamandClaude Opus 5.5 95d2a76583 feat(agc): capture frames at the driver boundary and replay them offline
APS5_FRAME_CAPTURE=<dir> makes the AGC driver record a few frames of a
title: the shader registrations and ABI resolutions, video output and
EOP flip reservations it made since it started, a snapshot of every
readable guest allocation (the title image included) taken at a frame
boundary once the driver is idle, and for the next frames each
submission, flip and suspend point with the thread that made it, its
serial progress and the guest pages the write tracker saw the CPU write
before it. At the end it stores the presented display buffers as
reference images. APS5_FRAME_CAPTURE_AT_FLIP, _TRIGGER and _FRAMES pick
the frames.

agc_frame_replay maps the captured memory at its addresses and replays
the calls of each captured thread on a thread of its own, in captured
order, through the current build of the driver with no title running.
It paces GPU work to the in-flight depth the title had, releases GPU
waits that the title's CPU threads released without calling the driver
(AgcDriverAwaitedWaits), and reports frame times, released waits and
how closely the replayed display buffers match the references.

Tests: agc_frame_capture (file format) and agc_driver_frame_replay
(two captured frames of CPU writes and DMA copies replayed and
compared). Docs: BUILD.md, ENVIRONMENT.md and the libSceAgcDriver debt
file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:09:44 +02:00
Sam 61711fe10f Merge remote-tracking branch 'origin/main' into fix/agc-capture-skip-float-probe
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
2026-10-23 20:24:13 +02:00
mantavisualandClaude Opus 5.5 6da3fa85e3 docs(build): point the antivirus note at the relinker tests' test-temp
The note told Windows users to set TEMP and TMP to a directory the scanner
excludes, but since 39dd854c8 CTest sets TMPDIR, TEMP and TMP of the
relinker tests to core/relinker/test-temp in the build directory, so those
variables no longer move the executables. Name that directory instead and
add windows_bss and windows_fixed_base, which fail the same way when the
scanner blocks the executables they run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 16:50:48 +03:00
Dean 72fe76ff89 Merge pull request #7920 from hugodearaujo/feat/agc-amd-buffer-marker-checkpoints
feat(agc): record GPU checkpoints through VK_AMD_buffer_marker
2026-10-23 21:20:57 +13:00
JJenkxandClaude Opus 5.5 cdc21a9897 fix(tools): bound symbol lookups to their section, keep inclusive counts and refuse unrecorded modules
Review of #9572 found three gaps:

- PeModule.name() checked that an RVA was in some code section, then
  bisected one list of every symbol, so an address in a later code
  section before that section's first symbol took the last symbol of an
  earlier section. Each code section now keeps its own sorted list.
- Address files keep both counters ('module offset self inclusive'):
  the inclusive count is kept and subtracted by --since, and the summary
  lists functions by inclusive samples as well, summed over each
  function's addresses (an upper bound when a function is on one stack
  more than once). The total comes from the '# N samples' line or from
  the 'thread <id> samples <n>' headings of APS5_SAMPLE_THREADS, which
  the loader previously misread as a stack line; --thread keeps one
  thread.
- The address writers of both samplers wrote no '# module' records, so
  those files skipped the size and timestamp check. Both now write them
  (through the helper the collapsed-stack writer uses), and the tool
  leaves a module unsymbolized when the samples have no record for it,
  unless --unverified is given.

Five new cases cover a second code section, inclusive totals, --since
on an address file, thread headings with --thread, and the missing
record with and without --unverified.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 01:49:21 -04:00
JJenkxandClaude Opus 5.5 59693ae54c feat(tools): symbolize the Windows samplers' stacks
The Windows samplers (APS5_SAMPLE_WORKER, APS5_SAMPLE_COMMITTER and
APS5_SAMPLE_THREADS) write every frame as module+0xRVA, and BUILD.md left
naming them to the reader ("for example with nm on the .prx"). Doing that
by hand means finding each module's image base, choosing between COFF
symbols and the export table, and keeping the files cumulative totals in
mind.

tools/symbolize_samples.py reads a collapsed-stack file or the address
file, opens each module it finds in --libs as a PE32+ image, and names
every frame module!function:

- From the COFF symbol table that the MinGW-built .prx and .dll keep:
  external and static symbols in code sections, at the section's RVA
  plus the symbol value. Addresses outside a code section, or before the
  first symbol, stay module+0xRVA.
- From the export table, prefixed with "~", for a module without
  symbols, such as the runtime DLLs.
- A module whose SizeOfImage or TimeDateStamp differs from the sampler's
  "# module" line is left unsymbolized, with a warning: its addresses
  would name the wrong functions.

--since subtracts an earlier copy of the same file, which keeps only the
samples taken between the two copies (the files hold totals since
start-up). --out writes the named stacks for speedscope or flamegraph.pl.
--demangle uses c++filt when it is on PATH. It needs no binutils
otherwise.

test_symbolize_samples (registered with CTest) builds small PE32+ images
with COFF symbols and with an export table, and covers short, string-table
and static names, the ignored section and data symbols, addresses outside
code, the export fallback, the size and timestamp check, --since with
--out, the address-file format and rejected lines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 01:49:21 -04:00
Enrique VandClaude Fable 5.1 c5dd9c1dd6 docs(build): add macOS relinker prerequisites
Name the commands that provide the compiler, CMake and Ninja on macOS
next to the existing mention of AppleClang in the relinker-only section.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-22 05:46:48 -06:00
zaryabzip a542a13f00 feat(libSceVorbisDec): decode Ogg Vorbis with libvorbisfile 1.3.7
Add libogg 1.3.6 and libvorbis 1.3.7 as submodules, built from source as
hidden static libraries, and implement the 31 libvorbisfile exports on top
of them. Decoder state lives in a host table keyed by the guest
OggVorbis_File, guest callbacks are trampolined, and vorbis_info is
returned in its LP64 layout.
2026-10-22 09:51:31 +05:00
Kang, Harry Zixuan 726edc503b feat(windows): support MSYS2 GCC runtime builds 2026-10-21 20:29:55 -07:00
dantdmdarealguy 38f8c806b7 docs(build): run the Python tools with python or py -3 on Windows 2026-10-21 09:28:38 -05:00
Sam 0560c1f095 Merge remote-tracking branch 'origin/main' into fix/agc-capture-skip-float-probe 2026-10-21 09:43:30 +02:00
Dean 3b5a24c0d6 Merge pull request #8075 from johandavidcm/feat/agc-sample-committer
feat(agc): sample the draw committer with APS5_SAMPLE_COMMITTER
2026-10-21 14:12:36 +13:00
mantavisualandClaude Opus 5.5 5acc9dd791 docs(build): note the Group Policy script block on libusb's version step
libusb's CMake generates version_describe.h by running gen-describe.ps1
with -ExecutionPolicy Bypass. An execution policy set by Group Policy
takes precedence over that switch, so with Restricted or AllSigned the
Windows build stops at version_describe.h. Describe the failure and a
.cmd stand-in, passed as LIBUSB_POWERSHELL_EXECUTABLE, that runs
gen-describe.sh with Git for Windows' bash as the PowerShell script does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 19:30:00 +03:00
Sam 96ff1330eb fix(agc): leave the float-controls probe's pipelines out of compute captures
The start-up f32 denormal flush probe already stays out of the pipeline
counters and the pipeline journal, but APS5_DUMP_COMPUTE_PIPELINES still
captured its pipelines. On a device that runs the probe, every capture
directory gained twelve driver-internal records that count toward the
128-record limit, and agc_compute_pipeline_capture_run found 14 captures
for a fixture with two programs.
2026-10-20 15:01:44 +02:00
Ethan Barcus a8e06fb008 Merge branch 'main' into feat/trace-bench-fields 2026-10-20 02:57:23 -05:00
Dean df6122881d Merge pull request #8067 from harry-z-kang/codex/relinker-static-mingw-tests
fix(build): allow static MinGW runtimes in relinker-only tests
2026-10-20 18:34:06 +13:00
Dean 964093ef36 Merge pull request #5710 from AMRYB/fix/web-release-pairing
fix(web): publish converter and libraries from one release
2026-10-20 17:47:07 +13:00
Dean a020d02560 Merge pull request #7718 from To3akaRin/codex/fix-syntax-check-dependency-flags
fix(tools): strip dependency options before syntax checks
2026-10-20 15:53:38 +13:00
To3akaRin c1c416fc43 docs(build): translate quick syntax checks into English 2026-10-20 09:09:09 +08:00
Kang, Harry Zixuan 995c10ec6b fix(build): allow static MinGW runtimes in relinker-only tests 2026-10-19 16:50:10 -07:00
Johan David e4898783b6 feat(agc): sample the draw committer with APS5_SAMPLE_COMMITTER
Queue 0's draw committer records the draws the packet worker hands
over. When the worker's APS5_SAMPLE_WORKER stacks wait in
DrawPipeline::Enqueue, the committer is the thread that bounds the
frame, and only APS5_SAMPLE_THREADS sees it: 40 addresses, 12 frames
deep, without whole stacks.

APS5_SAMPLE_COMMITTER=<file> attaches the worker's sampler to the
committer when its thread starts and writes the same two files. Both
use one start function, and StopWorkerSampler stops both.
2026-10-19 14:45:14 -05:00
RengundomandClaude Opus 5.5 88f8184102 fix(trace): write the benchmark file safely and off the presenter
Review of the benchmark report:

- The file is written to `<name>.tmp` and moved over the previous one, so a
  crash or kill during a rewrite keeps the last complete report.
- A dedicated writer keeps only the newest pending snapshot, so two reports
  can no longer be joined into one file when the writer falls behind.
- The report is formatted on the writer thread. The presenter hands over the
  kept intervals, which are shared and never copied, so the interval that
  closes no longer pays for formatting every earlier one.
- Hosts that are not x86 or report no CPU brand string leave the host fields
  out instead of failing every summary line.
- A `contentVersion` that is not a string, or does not fit, is left empty
  instead of failing the title's metadata.
- Tests cover the 240-interval rotation and `intervals_dropped`, the
  newest-only writer, the pending write on stop and the atomic replace.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 06:21:04 -05:00
hugodearaujo bec9850112 feat(agc): record GPU checkpoints through VK_AMD_buffer_marker 2026-10-19 08:15:43 -03:00
Adrià 13b4f66e12 Merge pull request #6665 from Dellz36/docs/windows-build-setup
docs(build): document Windows Python and Git Bash setup
2026-10-19 09:46:45 +02:00
eth-j17andClaude Opus 5.5 ca4303a155 feat(trace): record host, title and per-frame benchmark data
The summary line names the CPU, its thread count, physical memory and,
with param.json, the title ID, name and content version.

APS5_TRACE_BENCH=1 with APS5_TRACE_SUMMARY_EVERY rewrites
aps5-bench-<commit>-<pid>.json.gz at each interval with the time between
every two presents, so reports can be recomputed and checked from raw
frame times. param.json's contentVersion is read when present.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 01:01:13 -05:00
To3akaRin 7e8aa10ae6 fix(tools): strip dependency options before syntax checks 2026-10-19 10:43:00 +08:00
Amr Yasser e10616b17b fix(web): publish converter and libraries from one release 2026-10-18 23:26:42 +03:00
AlxcBTW 33fea9e1ba Merge main into pr/profile-windows 2026-10-18 19:49:54 +02:00
Adrià 84b7ef9de3 Merge pull request #6181 from MarcZX10/codex/document-guest-clock-scale-6172
docs(dev): describe the guest clock scale switch
2026-10-18 18:58:07 +02:00
AlxcBTW 0d699295a9 docs(agc): say which profile lines count per window and which since start 2026-10-18 12:36:32 +02:00
milescovielloandClaude Opus 5.5 f7cd8df309 fix(agc): trace the title threads that register shaders
Shader registration and the shader ABI resolves run on the title's own
threads, which never bound a trace buffer, so their Shader.Register and
Shader.Resolve* scopes were missing from every trace and summary. Those
entry points now bind the calling thread as `title` with the 32,768-event
buffer the shader preparation threads use.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 21:33:53 +00:00
MarcZX100 a2ed4abead docs(dev): clarify guest clock scale coverage 2026-10-17 17:50:36 +00:00
MarcZX100 c732321bd3 docs(dev): describe the guest clock scale switch 2026-10-17 17:50:36 +00:00
javierUDP 02c7da7677 fix: keep the Python tools and tests on Python 3.9
`Path.write_text(newline=...)` and `zip(strict=True)` were added in
Python 3.10. macOS ships 3.9.6 as /usr/bin/python3, the interpreter CMake
finds when no newer one is installed, so `prepare_release_notes` raised
TypeError when the release workflow wrote its notes and the
`pr_overlap_tools`, `release_package` and `linux_fixed_base` tests failed
on a stock macOS host. Writing the encoded text keeps the newline
translation off on every host, and the dynamic tag counts are compared
before the pairs are walked.
2026-10-17 10:31:10 -03:00
Dean 5bd85a44c2 Merge pull request #6876 from parl0v/docs/gputime-line
docs(build): describe the [gputime] line and its command classes
2026-10-17 16:47:31 +13:00
Adrià 7d728b1098 Merge pull request #6041 from wachi35676/docs/build-wasm-flag
docs(build): list the ANYPS5_BUILD_WASM flag
2026-10-16 23:17:04 +02:00
Adrià 4986aca62e Merge pull request #6002 from CrimsonMac/docs/bitdefender-raise-exception-deadlock
docs(build): note Bitdefender Advanced Threat Defense hanging guest_raise_exception
2026-10-16 22:48:06 +02:00
Adrià 7600f3dd18 Merge pull request #5903 from jotitadev/docs/build-relinker-macos-output
docs(build): list Mach-O among relinker-only outputs
2026-10-16 20:37:43 +02:00
Josip Parlov d67d37bde8 docs(build): describe the [gputime] line and its command classes 2026-10-16 17:32:43 +02:00
Dellz36 5338ff0631 docs(build): document Windows Python and Git Bash setup 2026-10-15 23:16:33 -04:00