Files
AnyPS5/docs/dev/debt/libSceJobManager.md
T

2.7 KiB

libSceJobManager technical debt

Functional

  • sce::Job::JobManager submits commands as work becomes runnable rather than encoding ahead with the rewind protocol recovered from PPSA06888's module (offsets 0x2210 and 0x2650). Commands are recycled after a completed wait. Command capacity is a separate bound from the dispatch count: the native size query measures one register and a 31-character marker, then its exhaustion callback at 0x29d0 traps instead of growing storage. The fallback throws. Original-module execution with the host AGC builders accepts two dispatches with 255 registers and 65,535-character markers, then traps on a third. Console timing equivalence remains unverified.
  • The manager keeps its state on the host heap rather than in the caller's block, apart from the block header, compute commands and completion labels. Blocks smaller than 0x2d8 bytes throw. Worker parking uses a host condition variable and mutex rather than the original semaphore and atomic queues; console scheduling and spin timing have not been measured. The fallback uses raw host TSC for its spin interval, so APS5_TIME_SCALE does not change host CPU use; the original module reads the scaled guest TSC when run through the host kernel.
  • Sequence and manager operations throw on a compute dispatch on a CPU sequence, a failing sceAgcDriverAddEqEvent, a factory priority above 1, and use of a destroyed sequence. shutdown throws while compute work is in flight. Kernel resource-creation failures throw after cleanup; the original does not check every thread or attribute creation result. Shutdown from a manager worker throws; new API calls concurrent with shutdown are unverified.
  • initialize returns 0 instead of the result of _sceUlobjmgrRegisterObject. The sceRazorCpuJobManager* profiler calls are not made. Sequence and factory virtual-function order is recovered from module vtables; no calling title has been run.
  • The fallback and Windows reference runner disagree: the runner times out in the node-pool exhaustion fixture against the PPSA06888 module with the host kernel; the fallback returns SequenceInvalid and recycles its nodes. The original Wait spins while allocating a node from the exhausted global pool and resumes when another sequence returns one; the fallback deliberately needs no Wait node. Original-module execution on Linux and console timing equivalence are not covered by this runner.