Resumption of Leyden Discusssion (was Re: Result: New Project: Leyden)

Andrew Dinn adinn at redhat.com
Tue Apr 27 16:26:01 UTC 2021


Hi David,

On 27/04/2021 16:50, David Griffiths wrote:
> Hi Andrew and all, could I just add a plea if possible to retain 
> ScopeDesc and PCDesc info (or equivalent) in the compiled code image? I 
> work for a company called Undo and we recently released a reversible 
> debugger for OpenJDK that lets you record an entire Java program history 
> at the machine level and then play it back under IntelliJ via an 
> extended JDWP interface. It allows you to set breakpoints on and single 
> step through compiled code, view all local variables and so on. But this 
> depends heavily on ScopeDesc and PCDesc and similar structures. We have 
> a "bridge" program that talks JDWP to IntelliJ and uses a modified 
> version of gdb to set breakpoints and poke around in compiled code in 
> the target (unmodified) JVM. We set breakpoints at nearby safepoints 
> (PCDescs) and then do the same thing the deoptimizer does to transfer 
> the current frame state to our own bytecode interpreter in the bridge 
> from where we can single step, examine local variables etc.
> 
> For situations like debugging microservices in the cloud, technology 
> like ours could be very useful. Whilst we have an obvious interest in 
> this, it seems like a good idea to try and aim to retain such structures 
> for future similar technologies to be built on.
I believe a native implementation that reuses the Hotspot JVM will be 
required to attach ScopeDesc and PCDesc info to the compiled method 
metadata inserted into the pre-generated code cache. The VM will need to 
retrieve them in order to populate stack backtraces.

We might perhaps choose to rewrite that part of the Hotspot code in a 
Leyden build to use some other structure or decode logic. However, I 
think the current model employs a compact and complete representation of 
what we need so I for th emoment can't think of any any reason why it 
should be changed.

regards,


Andrew Dinn
-----------
Red Hat Distinguished Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill



More information about the discuss mailing list