Repository navigation
Conversation
Engines built without frame pointers leave the frame-pointer backtrace at the SVC wrapper. A thread in an SVC now also gets a guest stack line: the words above the gate's register frame that point into a module's code, nearest first, and x19-x22 (Batman: Arkham Knight's FEvent waits).
…n SVC (x23-x28 are the caller's registers untouched by the SDK's wait wrappers, where a task or object pointer often is)
|
Thanks! Both commits are on main as f656796 and c8e4fd1, with one fix on top in 108ab9b. Checked: on Metroid Dread with Fixed in 108ab9b: the stack was read as one 1,280-byte |
…as on the console' (seedds#325) from Wick3dPhant0m/BananaNative:ctrl-applet into android
Thread dump: the guest callers and registers of a thread waiting in an SVC
The thread dump (
svc_thread_dump:DM_WATCH,DM_WATCH_STALL,DM_HITCH_DUMP, the crash report) gives each guest thread's wait and a frame-pointer backtrace. Engines built without frame pointers, such as Rocksteady's Unreal Engine 3 in Batman: Arkham Knight, stop that backtrace at the SDK's SVC wrapper. A freeze then showed many threads waiting on events, and nothing said which code had called the waits.A thread waiting in an SVC now gets one more line:
docs/agents/03-bringup.md's log table mentions the new line.Diagnostics only: nothing changes unless a dump is printed. These lines helped find Arkham Knight's freezes. They showed the rendering thread waiting on a task's event with no timeout (
main+0xbdd9f4, called frommain+0x165de24/main+0x165decc) and every task worker waiting on its own event;lldbthen read the task from the wrapper's saved registers. The cause was a task queue whose push and pop lacked barriers. That fix is in the game's own profile, in a PR of its own.Checked
ci.sh(host tests, CPU gfx tests, every gfx test built,dmhostfor three profiles, the iOS compile check, all tool tests): no failures.dmhostfor Breath of the Wild and Arkham Knight, the iOS compile check,test_docs.