It is fairly surprising to me that FB would pay a roughly 5% throughput penalty to get this.
Reverse Debugging at Scale
21–22 of 22 posts
Re: Reverse Debugging at Scale
#22Earlier quoted context omitted.
It won't work for anything with a JIT or interpreter, not without significantly more work.
Assuming that a Java debugger can convert a breakpoint to its corresponding source line, it must maintain some sort of source assembly mapping that transforms over time to do that lookup. As long as you record those changes, namely the introduction or destruction of any branches that Intel PT would record, the same underlying approach should work. The primary complexities there would be making sure those JIT records…
As for the JIT, it's not clear to me that modern Java VMs actually maintain a complete machine-code-to-application-bytecode mapping. It would be good for Pernosco if they did, but I think it's more likely they keep around just enough metadata to generate stack traces, and otherwise rely on tier-down with on-stack replacement to handle debugging with breakpoints, at least for the highest JIT tiers.