feat(tools): replay prosper's console measurements against the built modules #17730
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17730"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-11-09T13:17:22Z.
What
Adds
tools/library-oracle/, which replays prosper's published PS5 console measurements against the built AnyPS5 modules. The measurements cover 747 calls in nine families: libSceRtc, libc, libSceHttp/libSceNet, POSIX, libSceUserService, libkernel and libSceAgc sizes and packet builders. Several debt entries already cite them, but nothing replayed them.replay.cpp(library_oracle_replay,EXCLUDE_FROM_ALL):LoadLibraryordlopenand calls each export with the six SysV integer registers (APS5_VABI) and two zero arguments on the stack, so a function that reads a seventh or eighth argument the case does not give sees 0;library_oracle.py:known.tsvand exits non-zero on anything new. It also reports known lines that now match, so a fix removes them.known.tsv: every current difference with its reason, 164 lines plus one skip:sceHttpUriEscapeshort buffersceKernelWaitEqueuewith 0 eventsinet_ntopthat leaves stale bytes after the string, and avoidfunction's return registersceHttpUriUnescape, which reads the process parameters only the title loader sets uptest_library_oracle.py(CTestlibrary_oracle) covers:--write-known;It needs no build and no network.
docs/dev/REVERSE_ENGINEERING.md: one paragraph under the sources section.Tested
Windows 11, MinGW GCC Release build on
mainf57c971559.python3 tools/library-oracle/library_oracle.pyruns all nine families in under a minute and prints164 known findings, 0 new, 0 now matching. It exits 0.kx_eq_wait_zero_eventsline removed from the known file, it printsNEW diff kx_eq_wait_zero_events ...and exits 1.ctest -R ^library_oracle$passes.replay.cppcompiles with GCC 14 (gcc:14container,-Wall -Wextra,-ldl) and runs. I did not replay Linux-built modules. macOS is not tested.tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.py --branchmerged all 38 overlapping pull requests cleanly. The 13 it could not compare touch the top-levelCMakeLists.txtand already conflict withmain. Among them, #17558 also editsREVERSE_ENGINEERING.md, but at the end of the file, not near this paragraph.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)