fix(libSceAmpr): export sceAmprAmmSetPageTablePoolOccupancyNotificationThreshold #4251

Merged
Dextroid17 merged 1 commit from upstream-pr/4251 into main 2026-10-12 12:23:06 +00:00
Dextroid17 commented 2026-10-12 02:24:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-12T02:24:33Z.


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:

  • guest_ampr_tests (registered as ctest guest_ampr_markers) passes, and nm -D on the produced libSceAmpr.prx lists the export. On main (d146ec1b6) neither this name nor sceAmprAmmGetUsageStatsData exists anywhere under core/, so no library built from main can resolve either NID.
  • Relinked PPSA35169 (01.003.000) with the whole set its start-up path needs — the two libkernel recorders (#4244), the sceAmprAmmGetUsageStatsData export (#3814 / #4207) and this one: the title clears the wall in #4214 and gets much further than before, creating its Vulkan device and swapchain, touching save data and running 16 game threads (measured). It then stops on an unrelated NGS2 audio wall, filed as #4246. Only the export set moves the title, which is why this is one export of that set and not a fix on its own.
  • tools/check_conventions.py passes.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none — this export stands on its own; the title's progress additionally needs #4244 and #3814/#4207, all open
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4824188636 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4251). Originally posted by [Dextroid17](https://github.com/Dextroid17) on 2026-10-12T02:24:33Z. --- ### 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: - `guest_ampr_tests` (registered as ctest `guest_ampr_markers`) passes, and `nm -D` on the produced `libSceAmpr.prx` lists the export. On `main` (`d146ec1b6`) neither this name nor `sceAmprAmmGetUsageStatsData` exists anywhere under `core/`, so no library built from `main` can resolve either NID. - Relinked PPSA35169 (01.003.000) with the whole set its start-up path needs — the two `libkernel` recorders (#4244), the `sceAmprAmmGetUsageStatsData` export (#3814 / #4207) and this one: the title clears the wall in #4214 and gets much further than before, creating its Vulkan device and swapchain, touching save data and running 16 game threads ([measured](https://github.com/boykopovar/AnyPS5/issues/4214#issuecomment-6116547964)). It then stops on an unrelated NGS2 audio wall, filed as #4246. Only the export set moves the title, which is why this is one export of that set and not a fix on its own. - `tools/check_conventions.py` passes. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none — this export stands on its own; the title's progress additionally needs #4244 and #3814/#4207, all open - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-12 02:25:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T02:25:35Z.


Progress report (d146ec1 → ef3b121)

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

🆕 1 declared as stubs
Library Name
libSceAmpr sceAmprAmmSetPageTablePoolOccupancyNotificationThreshold
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6116639398 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4251#issuecomment-6116639398). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-12T02:25:35Z. --- <!-- progress-report --> ### Progress report (d146ec1 → ef3b121) 📉 **System libraries**: 86.52% (-0.02%, +1 declared functions) <details> <summary>🆕 1 declared as stubs</summary> | Library | Name | | - | - | | libSceAmpr | `sceAmprAmmSetPageTablePoolOccupancyNotificationThreshold` | </details>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!4251
No description provided.