Re: RFR (M) Close alignment gaps in InstanceKlass

2020-04-23 Thread coleen . phillimore
Thanks, Dean! Coleen On 4/23/20 4:16 PM, Dean Long wrote: OK, thanks, looks good! dl On 4/22/20 7:32 PM, coleen.phillim...@oracle.com wrote: On 4/22/20 9:00 PM, Dean Long wrote: It looks like calling the JVMCI getSourceFileName() on an array would have accessed random memory because it

Re: RFR (M) Close alignment gaps in InstanceKlass

2020-04-23 Thread Dean Long
OK, thanks, looks good! dl On 4/22/20 7:32 PM, coleen.phillim...@oracle.com wrote: On 4/22/20 9:00 PM, Dean Long wrote: It looks like calling the JVMCI getSourceFileName() on an array would have accessed random memory because it was expecting an InstanceKlass.  Instead of returning null we

Re: RFR (M) Close alignment gaps in InstanceKlass

2020-04-23 Thread coleen . phillimore
Thanks, Ioi! Coleen On 4/23/20 12:43 PM, Ioi Lam wrote: Hi Coleen, The changes look good to me. Thanks - Ioi On 4/21/20 1:12 PM, coleen.phillim...@oracle.com wrote: Summary: moved fields around and some constant fields into ConstantPool This is a simple change except that I moved some

Re: RFR (M) Close alignment gaps in InstanceKlass

2020-04-22 Thread coleen . phillimore
On 4/22/20 9:00 PM, Dean Long wrote: It looks like calling the JVMCI getSourceFileName() on an array would have accessed random memory because it was expecting an InstanceKlass.  Instead of returning null we might want to throw an exception like in HotSpotResolvedPrimitiveType. It was never

Re: RFR (M) Close alignment gaps in InstanceKlass

2020-04-22 Thread Dean Long
It looks like calling the JVMCI getSourceFileName() on an array would have accessed random memory because it was expecting an InstanceKlass.  Instead of returning null we might want to throw an exception like in HotSpotResolvedPrimitiveType. dl On 4/22/20 5:39 PM, Dean Long wrote: Can you

Re: RFR (M) Close alignment gaps in InstanceKlass

2020-04-22 Thread Dean Long
Can you compare the result to some string, like "Object.java"?  That seems to be what HotSpotResolvedObjectTypeTest.java is doing. Also, did getSourceFileName() return null for arrays before your change? dl On 4/22/20 8:18 AM, coleen.phillim...@oracle.com wrote: Hi Dean, Thank you for

Re: RFR (M) Close alignment gaps in InstanceKlass

2020-04-22 Thread coleen . phillimore
Hi Dean, Thank you for looking at the JVMCI changes and the suggestion to add the test.  I did this and found a bug.  The new test is quite limited because there's no good test to see if a source file name can assertNotNull(type.getSourceFileName()), so I couldn't iterate through the list

Re: RFR (M) Close alignment gaps in InstanceKlass

2020-04-21 Thread Dean Long
Hi Coleen.  The JVMCI changes look OK.  It looks like there is a Graal unittest that covers getSourceFileName, but those tests don't always get run.  If it's not too much trouble, could you look into enabling getSourceFileName() testing in

Re: RFR (M) Close alignment gaps in InstanceKlass

2020-04-21 Thread coleen . phillimore
On 4/21/20 4:41 PM, Chris Plummer wrote: Hi Coleen, The SA changes look good. BTW, I've already made the TestIntConstant.java change in the Loom project. InstanceKlass::_misc_is_unsafe_anonymous was already changed to "8" in loom. You might want to sync up with Ron to make sure you aren't

Re: RFR (M) Close alignment gaps in InstanceKlass

2020-04-21 Thread coleen . phillimore
On 4/21/20 4:41 PM, Chris Plummer wrote: Hi Coleen, The SA changes look good. BTW, I've already made the TestIntConstant.java change in the Loom project. InstanceKlass::_misc_is_unsafe_anonymous was already changed to "8" in loom. You might want to sync up with Ron to make sure you aren't

Re: RFR (M) Close alignment gaps in InstanceKlass

2020-04-21 Thread Chris Plummer
Hi Coleen, The SA changes look good. BTW, I've already made the TestIntConstant.java change in the Loom project. InstanceKlass::_misc_is_unsafe_anonymous was already changed to "8" in loom. You might want to sync up with Ron to make sure you aren't making conflicting changes in this area.

RFR (M) Close alignment gaps in InstanceKlass

2020-04-21 Thread coleen . phillimore
Summary: moved fields around and some constant fields into ConstantPool This is a simple change except that I moved some constant fields from InstanceKlass into the constant pool so they can be shared read-only in the CDS archive.  There are associated repercussions in SA and JVMCI, so please