Actions
Emulator Issues #8165
closedTools: Linux perf cannot disassemble JIT-compiled code
Status:
Fixed
Priority:
Low
Assignee:
-
% Done:
0%
Operating system:
N/A
Issue type:
Feature request
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:
Description
Even when Dolphin is started with "-P /tmp" to generate JIT symbols, perf still can't disassemble JIT-compiled code because it uses objdump for that which only looks at the executable on disk.
I hacked up a little workaround which should be re-done properly and either be merged upstream (Linux), added to our Tools/, or at least get documented somewhere:
$ cat disassemble.sh
#!/bin/bash
gdb -q -p $(pidof dolphin-emu) -ex "disas ${1##--start-address=},${2##--stop-address=}" -ex q -batch
$ dolphin-emu -P /tmp -b -e $game.iso &
$ perf top $(pidof dolphin-emu) --objdump ./disassemble.sh
This works but has a few issues:
- gdb shows relative addresses for non-JIT functions, perf doesn't understand that
- only supports the default disassembly mode of perf
I'll get to it when I have time but if someone else wants to work on this, please do.
Actions