Accepting jdwp connection early enough to debug Graal startup with -Xcomp

Doug Simon doug.simon at oracle.com
Wed Aug 28 09:58:02 UTC 2019


Hi Gary,

I’ve noticed the same thing myself and have not yet found a good solution. It would be nice to know what the definitive point is in VM startup after which JDWP debugging is “on”. I’ve cc’ed Alan Bateman who may be able to offer some insight (or redirect to someone who can).

-Doug

> On 28 Aug 2019, at 11:52, Gary Frost <frost.gary at gmail.com> wrote:
> 
> Have been away from Graal since 'Sumatra' days so forgive the 'n00b'
> question.
> 
> I have been patching Graal's startup (to mutate some nodes) and noticed
> that when I run with a standard jdwp connector configured thusly..
> 
> -agentlib:jdwp=transport=dt_socket,server=y,address=8000
> 
> By the time my debug connection has attached I have 'missed' all the Graal
> setup 'goodness' :)
> 
> Admittedly I am running with -Xcomp  (oh and this is OpenJDK 11)
> 
> Re-reading the jdwp specs, I note that the contract is only that the VM
> will halt and wait for connections prior to entering my applications'
> main(). So no bug here, I just wish I could halt earlier ;)
> 
> How (if there is a way) do you guys get to debug startup with -Xcomp?
> 
> Is there a trick? that I am missing to halt as early as possible (I
> understand there is an implied race)
> 
> Gary



More information about the graal-dev mailing list