feat(libs): report Http2, Ssl and Net memory pool statistics #1119

Merged
TideOPL merged 2 commits from upstream-pr/1119 into main 2026-10-09 08:03:06 +00:00
TideOPL commented 2026-10-07 13:13:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by TideOPL on 2026-10-07T13:13:47Z.


What

sceHttp2GetMemoryPoolStats, sceSslGetMemoryPoolStats and sceNetGetMemoryPoolStats threw. PPSA16064 (Minecraft Dungeons II, Unreal Engine) queries all three while its HTTP module starts.

  • Each library records the pool size given at sceHttp2Init, sceSslInit or sceNetPoolCreate, reports it, and reports a peak and current use of 0. The offline Http2/Ssl models and the host-socket Net library never allocate from these pools.
  • The layouts follow the PS4 SDK's *MemoryPoolStats structures (pool size, peak, current, plus a 32-bit reserved field for Http2 and Ssl). They're not confirmed for the PS5; TechnicalDebt records that.
  • Net returns EBADF for an unknown pool and EINVAL for a null output, like its other pool calls. Http2 and Ssl throw for both, since their error codes are unknown. Terminating a context or destroying a pool forgets its size.
  • sceHttp2SetResolveRetry (int id, int32_t retry), which the title calls next, accepts and ignores its value like the other Http2 settings.
  • The four Http2 WebSocket exports the title imports are added as unimplemented.

Tested

  • Windows 11, NVIDIA GeForce RTX 5070, MinGW-w64 GCC 15.2.0 (WinLibs UCRT r7). Full ctest: 393/393.
  • guest_http2, guest_ssl, guest_sce_net: the reported sizes; guest_sce_net also checks the null-output and unknown-pool errors.
  • PPSA16064: the title gets past its HTTP module start-up.

Asking for ideas

If anyone has the PS5 layouts or error codes for these (e.g. from a title that checks them), I'll match them.

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
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4773169600 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1119). Originally posted by [TideOPL](https://github.com/TideOPL) on 2026-10-07T13:13:47Z. --- ### What `sceHttp2GetMemoryPoolStats`, `sceSslGetMemoryPoolStats` and `sceNetGetMemoryPoolStats` threw. PPSA16064 (Minecraft Dungeons II, Unreal Engine) queries all three while its HTTP module starts. - Each library records the pool size given at `sceHttp2Init`, `sceSslInit` or `sceNetPoolCreate`, reports it, and reports a peak and current use of 0. The offline Http2/Ssl models and the host-socket Net library never allocate from these pools. - The layouts follow the PS4 SDK's `*MemoryPoolStats` structures (pool size, peak, current, plus a 32-bit reserved field for Http2 and Ssl). They're not confirmed for the PS5; TechnicalDebt records that. - Net returns `EBADF` for an unknown pool and `EINVAL` for a null output, like its other pool calls. Http2 and Ssl throw for both, since their error codes are unknown. Terminating a context or destroying a pool forgets its size. - `sceHttp2SetResolveRetry` `(int id, int32_t retry)`, which the title calls next, accepts and ignores its value like the other Http2 settings. - The four Http2 WebSocket exports the title imports are added as unimplemented. ### Tested - Windows 11, NVIDIA GeForce RTX 5070, MinGW-w64 GCC 15.2.0 (WinLibs UCRT r7). Full `ctest`: 393/393. - `guest_http2`, `guest_ssl`, `guest_sce_net`: the reported sizes; `guest_sce_net` also checks the null-output and unknown-pool errors. - PPSA16064: the title gets past its HTTP module start-up. ### Asking for ideas If anyone has the PS5 layouts or error codes for these (e.g. from a title that checks them), I'll match them. ### Checklist - [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 - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-07 13:54:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-07T13:54:46Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#1092 core/libs/prx/libSceHttp2/Export.cpp L4-5, L10
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6039471301 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1119#issuecomment-6039471301). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-07T13:54:46Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #1092 | `core/libs/prx/libSceHttp2/Export.cpp` [L4-5](https://github.com/boykopovar/AnyPS5/blob/df16c4c256be3c44e03eb9149a6ce5f8e8a038b2/core/libs/prx/libSceHttp2/Export.cpp#L4-L5), [L10](https://github.com/boykopovar/AnyPS5/blob/df16c4c256be3c44e03eb9149a6ce5f8e8a038b2/core/libs/prx/libSceHttp2/Export.cpp#L10) | | |
github-actions[bot] commented 2026-10-08 04:37:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T04:37:29Z.


Progress report (73ac9ef → d1627cb)

📉 System libraries: 85.39% (-0.01%, +4 implemented, +4 declared functions)

✅ 4 implemented
Library Name
libSceHttp2 sceHttp2GetMemoryPoolStats
libSceHttp2 sceHttp2SetResolveRetry
libSceNet sceNetGetMemoryPoolStats
libSceSsl sceSslGetMemoryPoolStats
🆕 4 declared as stubs
Library Name
libSceHttp2 sceHttp2WebSocketCloseAsync
libSceHttp2 sceHttp2WebSocketCreateRequest
libSceHttp2 sceHttp2WebSocketSendDataMessageAsync
libSceHttp2 sceHttp2WebSocketSendTextMessageAsync
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6052352550 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1119#issuecomment-6052352550). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-08T04:37:29Z. --- <!-- progress-report --> ### Progress report (73ac9ef → d1627cb) 📉 **System libraries**: 85.39% (-0.01%, +4 implemented, +4 declared functions) <details> <summary>✅ 4 implemented</summary> | Library | Name | | - | - | | libSceHttp2 | `sceHttp2GetMemoryPoolStats` | | libSceHttp2 | `sceHttp2SetResolveRetry` | | libSceNet | `sceNetGetMemoryPoolStats` | | libSceSsl | `sceSslGetMemoryPoolStats` | </details> <details> <summary>🆕 4 declared as stubs</summary> | Library | Name | | - | - | | libSceHttp2 | `sceHttp2WebSocketCloseAsync` | | libSceHttp2 | `sceHttp2WebSocketCreateRequest` | | libSceHttp2 | `sceHttp2WebSocketSendDataMessageAsync` | | libSceHttp2 | `sceHttp2WebSocketSendTextMessageAsync` | </details>
oneandonlydean commented 2026-10-08 05:30:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-08T05:30:40Z.


#1092 just landed and touches the same spots in libSceHttp2/Export.cpp (includes and the statics above the exports), so this needs a rebase onto main. Keep both: the completion queue from #1092 and your pool map.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6053048644 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1119#issuecomment-6053048644). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-08T05:30:40Z. --- #1092 just landed and touches the same spots in `libSceHttp2/Export.cpp` (includes and the statics above the exports), so this needs a rebase onto main. Keep both: the completion queue from #1092 and your pool map.
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!1119
No description provided.