Closed Bug 1442536 Opened 6 years ago Closed 5 years ago

ARM64 simulator: Implement single-step profiling


(Core :: JavaScript Engine: JIT, enhancement, P3)






(Reporter: lth, Unassigned)


(Blocks 1 open bug)



(1 file)

2.09 KB, application/octet-stream
Single-step profiling is used by several of the test cases and we can probably implement this fairly easily in the simulator (it is currently available on ARM and MIPS64).

Rough work order:

- enable in shell/jsshell.h (easy)
- need hooks to read registers in js.cpp in SingleStepCallback (easy)
- support single-stepping in simulator itself (a bit harder)
- unknown wrinkles
Hardware: All → ARM64
Blocks: 1445162
No longer depends on: Rabaldr-ARM64
Attached file arm64.gdb

For your information, I do not think this is necessary. I have been debugging using the simulator with the following gdb file to be sourced when I start debugging a process with the ARM64 simulator and this works like a charm. The only trick is that to make it work with rr, you have to use rcc instead of rc.

This file adds a breakpoint at the location where the simulator is stepping, and enabling/disabling and displays the ARM64 instruction each time. The value of the registers are made available in the $x__ variables.

If needed we can move this file in the tree for a better debugging experience, but I do not think we need to add some interactive mode as part of the Simulator. From my experience, these interactive mode are worse than any integrated experience within gdb.

Since we all got ARM64 devices on hand, and the arm64.gdb script from the previous comment gives us enough tooling on top of the simulator, the simulator profiling (tracing) is no longer necessary.

Closed: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.