feat(psp): expose allocator telemetry and arena diagnostics - #422
Merged
doodlewind merged 12 commits intoSep 17, 2026
Merged
Conversation
doodlewind
marked this pull request as ready for review
September 17, 2026 16:42
Collaborator
|
Thanks for the contribution! The QuickJS allocation telemetry and arena diagnostics will make PSP memory issues much easier to investigate. We have completed hardware acceptance and merged this while preserving your original commits. I really appreciate the work you have put into improving PocketJS for downstream projects. Feel free to DM @pocket_js on X — I would love to connect! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PSP applications need to distinguish QuickJS request pressure from reusable arena capacity. This PR adds process-lifetime QuickJS allocation counters and a non-allocating arena free-space snapshot, without introducing product logic into the host.
Follow-up integration:
hosts/psp/examples/allocator-check.rs: an interactive PSP test of an 18,200,001-byte permanent buffer and real QuickJS allocation/GC/runtime teardown. CROSS repeats the workload without allocating another permanent buffer; HOME exits.This branch includes #423 for the combined tests and device example. Merge #423 first; its changes will then disappear from this PR's main-relative diff. Original contributor commits are retained, with integration/follow-up commits appended; use merge commits rather than squash/rebase.
Validation:
Device build: #422
174b5c5d02ee3de733a5962884e990a0831ab68f, #423dc4fce0ea95d0634c4fa4f014081de79fd106e53.Command:
POCKETJS_ALLOCATOR_REVISION='422:174b5c5d 423:dc4fce0e' bun tools/psp.ts hero --release --example allocator-check.Allocator EBOOT SHA-256:
0fd19fa2ffe8b5488fbca2a2169d5f5fbde0aba3ade9bbc3bd478ae207a21431.Acceptance procedure and API boundaries:
docs/PSP_ALLOCATOR.md. No downstream game acceptance is implied.Hardware acceptance covers #422
174b5c5d02ee3de733a5962884e990a0831ab68fand #423dc4fce0ea95d0634c4fa4f014081de79fd106e53. Deployed PRX SHA-256:3eaf5c10e2b97c92596a783670de8db323e0eb8608d0ac1fbded3c553296ba42. Device model was not recorded; this does not claim a downstream game acceptance.