Re:Understanding How Graal Works – A Java JIT Compiler Writt...
by chrisseaton on Sunday November 05, 2017 @01:53AM
(#15628444)
As well as being given a method to compile you can then also request the bytecode and metadata of any other method, for example to inline it.
[ Parent
| on HN ]
Re:Understanding How Graal Works – A Java JIT Compiler Writt...
by valarauca1 on Sunday November 05, 2017 @06:00AM
(#15628936)
Okay, then how are stack traces and de-opt events handled?
These are the _really_ hard problems with JIT compilers. Tracking the IP location in a block of ASM may result in a 3+ Java “methods” being executed at once.
Re:Understanding How Graal Works – A Java JIT Compiler Writt...
by chrisseaton on Sunday November 05, 2017 @07:20AM
(#15629100)
When you install code you need to provide a frame map and metadata that maps registers, stack locations and IPs to locals, objects and bytecode.
Consider following the advice I put in the document. Open it up in Eclipse and explore using standard Java tools and discover for yourself. That was the whole point.
Re:Understanding How Graal Works – A Java JIT Compiler Writt...
by chrisseaton on Sunday November 05, 2017 @08:38AM
(#15629306)
Now I'm at a desk, I can say start looking at the FrameState class.
https://github.com/graalvm/graal/blob/cd655e1df4f388c78364f0...
And that's the beauty of it! If you were interested in frame states, typing FrameState into Eclipse will have found this, and then start looking at what calls these methods.