-
Notifications
You must be signed in to change notification settings - Fork 728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow fabricated loadaddr for classes in AOT #2083
Conversation
This is the openj9 part of eclipse-omr/omr#2636. |
fe8db03
to
a3df43f
Compare
Updated to avoid adding |
Jenkins test sanity |
Ok so sanity tests say JDK8 windows build failed due to #2129. Travis build is shown failed because the dependent OMR change had not been merged at that time. The only issue to be resolved here is to fix the copyright failure. @jdmpapin can you please verify the copyright and then do a push to update the change? I don't think we need sanity again - we need travis clean and the copyright check clean provided the only update you make is to the copyright headers |
a3df43f
to
119b81a
Compare
Updated the copyright header in J9AheadOfTimeCompile.hpp |
More specifically for classes loaded by the bootstrap class loader, which are unambiguously identifiable at relocation time. This allows the JIT compiler to make up references to types about which it has special knowledge. In particular, it's now possible to create a loadaddr for java/lang/Class "out of thin air," without a corresponding constant pool entry available. At a high level, the appropriate relocations are carried out as follows: 1. Allow TR_ClassAddress ExternalRelocations to be created without a constant pool index. 2. Before grouping into IteratedExternalRelocations, identify these and set their kind to the new TR_ArbitraryClassAddress. 3. Write the relocation record for TR_ArbitraryClassAddress with the same data as would be required for TR_ClassPointer. 4. Relocate TR_ArbitraryClassAddress by finding the class as though for TR_ClassPointer, and then patching the code as though for TR_ClassAddress (to deal with materialization sequences). Note that because the compilation has the class pointer, it must have been through validateArbitraryClass(). In case the class can't be found at relocation time, the validation record will cause relocation to fail, so the value used for missing classes is irrelevant. Power code generation is updated to generate a materialization sequence and relocation when it encounters a fabricated class symbol reference in an AOT (ahead of time) compilation. Previously it used an unresolved snippet, which requires a constant pool index. Signed-off-by: Devin Papineau <[email protected]>
119b81a
to
b2ef4e2
Compare
Build is clean and CI completed previously as noted - merging |
More specifically for classes loaded by the bootstrap class loader,
which are unambiguously identifiable at relocation time.
This allows the JIT compiler to make up references to types about which
it has special knowledge. In particular, it's now possible to create a
loadaddr for java/lang/Class "out of thin air," without a corresponding
constant pool entry available.
At a high level, the appropriate relocations are carried out as follows:
Allow TR_ClassAddress ExternalRelocations to be created without a
constant pool index.
Before grouping into IteratedExternalRelocations, identify these
and set their kind to the new TR_ArbitraryClassAddress.
Write the relocation record for TR_ArbitraryClassAddress with the
same data as would be required for TR_ClassPointer.
Relocate TR_ArbitraryClassAddress by finding the class as though
for TR_ClassPointer, and then patching the code as though for
TR_ClassAddress (to deal with materialization sequences).
Note that because the compilation has the class pointer, it must have
been through validateArbitraryClass(). In case the class can't be found
at relocation time, the validation record will cause relocation to fail,
so the value used for missing classes is irrelevant.
Power code generation is updated to generate a materialization sequence
and relocation when it encounters a fabricated class symbol reference in
an AOT (ahead of time) compilation. Previously it used an unresolved
snippet, which requires a constant pool index.