Testing and compiling hotspot
vladimir.kozlov at oracle.com
Thu May 26 22:03:57 UTC 2016
Disclaimer: I am not very familiar with C1, I am specializing on C2.
On 5/26/16 1:25 PM, Radek wrote:
> Thank you Vladimir,
> I have few other, descriptive questions, and I apologises for less strict questions.
> I work on sharing memory in JVM, I have modified C1 and G1 (it works, but maybe I did something which I do not understand). Hotspot is pretty complicated, and there is a lot of ideas which are hard to be understand by code analyse.
> I have two concerns: one is “state”, 2nd one is XHandlers.
> I wonder for what purposes the “state” is used? I’ve seen that there is few places where state_for, and copy_state_* is used in LIR_Generator. My understanding is that this represents the state of VM before and after the given instruction. This state is expressed as “instructions” used to obtain given value. Than, I suppose, the state is transformed to registers which can be used by instructions, so last stack value can represent REG_X in state before, and REG_Y in state after (ie. state before field is loaded and after)? Am I right? Please free to correct me.
As I understand 'state' is referring the JVM state when Interpreter executes this bytecode.
JIT compiler have to track such states to be able "deoptimize" a compiled code and continue execution of this method in Interpreter. The state consist of BCI and mapping between locals, expressions,
monitores and corresponding registers and stack slots in compiled code.
> My 2nd question is about XHandlers. What XHandler actually is? Is this catch block? I’ve seen looking for XHandlers in signal block used to capture null references.
"// An XHandler is a C1 internal description for an exception handler"
Yes, in simple term it is a class which associated with bytecode corresponding to java 'catch' block.
But it covers not only exception clearly expressed in java but also exceptions generated by VM - like NULL pointer exceptions and others.
> Thanks in advance,
>> On 25 May 2016, at 18:48, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
>> Your command line looks correct. You don't need 'hotspot', just 'jdk' is enough - it will build hotspot too and put libjvm.so into built jdk.
>> It takes time only for first build. If you change only hotspot after that the same command should be faster since only hotspot will be rebuilt.
>> On 5/25/16 7:40 AM, Radek wrote:
>>> Dear all,
>>> Please don’t kill me for asking less hotspot related question.
>>> I working on hotspot code (memory management). In order to build and debug it I firstly build JDK with following command:
>>> make CONF=linux-x86_64-normal-server-slowdebug JOBS=10 LOG=info hotspot jdk
>>> This takes a bit of time. I tried to analyse make files to answer my question, but ….
>>> I wonder if you know some magical combination of commands so,
>>> - I can execute particular test,
>>> - I can start JVM without building JDK.
>>> Thanks in advance,
More information about the hotspot-compiler-dev