Skip to content

fix(libSceAmpr): export sceAmprAmmSetPageTablePoolOccupancyNotificationThreshold - #4251

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
Dextroid17:fix/libampr-usage-stats-stubs
Oct 12, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
Dextroid17:fix/libampr-usage-stats-stubs

Conversation

@Dextroid17

@Dextroid17 Dextroid17 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What

Exports sceAmprAmmSetPageTablePoolOccupancyNotificationThreshold (touqMEt6qXQ) — once the two libkernel recorders of #4214 (#4244) and the sibling export below are landed, this is the last import Trails in the Sky 2nd Chapter (PPSA35169, 01.003.000) is left missing on libSceAmpr.prx. The name hashes to exactly that NID (tools/nid_names.py), so the plain export binds it, and the built library carries it: nm -D lists sceAmprAmmSetPageTablePoolOccupancyNotificationThreshold in the produced libSceAmpr.prx.

Nothing in this tree implements the call, and the only counterpart elsewhere is itself a placeholder. KytyPS5's libAmpr.cpp binds the same NID to AmmSetPageTablePoolOccupancyNotificationThreshold(uint32_t), whose whole body is PRINT_NAME(); return OK; — it never reads the value it is handed. Porting that would ship exactly the success-that-ignores-its-input this project refuses, so the export throws instead: NotImplemented_nid_no_patch, the documented state for an unimplemented export in CONTRIBUTING.md. The declared arity follows the existing stubs in this tree, which take no parameters and throw before any argument is read.

The sibling import of the same set, sceAmprAmmGetUsageStatsData (KqiWXLgCVe0), is deliberately not in this PR: three other open PRs already carry it — #3814 and #4220 as throwing stubs, #4207 as an implementation from a cited layout. A copy here would only put a second PR on the same export.

Tested

Linux (CachyOS), GCC 16.2.1, Release, full build of main + this branch:

Checklist

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Progress report (d146ec1 → ef3b121)

📉 System libraries: 86.52% (-0.02%, +1 declared functions)

🆕 1 declared as stubs
Library Name
libSceAmpr sceAmprAmmSetPageTablePoolOccupancyNotificationThreshold

…onThreshold

Resolves NID touqMEt6qXQ, the last import Trails in the Sky 2nd Chapter
(PPSA35169) is left missing on libSceAmpr.prx once the libkernel pair in boykopovar#4214
is recorded. No reference describes the function's contract, so it throws via
the project's NotImplemented_nid_no_patch pattern rather than guessing a result
that a caller would act on.

sceAmprAmmGetUsageStatsData (KqiWXLgCVe0) is deliberately not included: boykopovar#3814
exports it and boykopovar#4207 answers it from a cited layout.

See issue boykopovar#4214.
@Dextroid17
Dextroid17 force-pushed the fix/libampr-usage-stats-stubs branch from 49ee6c1 to ef3b121 Compare October 12, 2026 03:24
@Dextroid17 Dextroid17 changed the title fix(libSceAmpr): add throwing stubs for sceAmprAmmGetUsageStatsData a… fix(libSceAmpr): export sceAmprAmmSetPageTablePoolOccupancyNotificationThreshold Oct 12, 2026
@oneandonlydean oneandonlydean self-assigned this Oct 12, 2026
@oneandonlydean
oneandonlydean merged commit 9b20dd5 into boykopovar:main Oct 12, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants