mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 08:33:12 -05:00
sceKernelGetModuleInfoFromAddr found the size of the image's .eh_frame on every call by walking all of its CIE and FDE records, checking each against every PT_LOAD header. The guest libc's unwinder calls it for each frame it unwinds, so a title that unwinds often walked its whole .eh_frame hundreds of times per second. The tables read from a .eh_frame_hdr are now kept per header address and reused while the image stays loaded. The cache is dropped whenever dl_iterate_phdr reports that an object was unloaded (dlpi_subs), so an address reused by another image is read again. guest_module_info queries a module twice and expects the same tables, then unloads it, loads it again and expects tables of the same size at the same offset in the new image. PPSA16827 (Harmony's Odyssey), title screen, over 500 calls per second counted under gdb, which slows the title: the process used 9269 CPU samples per 10 s, 53.7% of them in this walk, and 3306 with this change, 3.2% in the lookup. The title still runs at 27 FPS; its frame rate is limited elsewhere.