RFR 8245289: Clean up offset code in JavaClasses
coleen.phillimore at oracle.com
coleen.phillimore at oracle.com
Fri May 29 18:19:51 UTC 2020
Lois, thank you for reviewing!
On 5/29/20 11:32 AM, Lois Foltan wrote:
> On 5/28/2020 8:48 AM, coleen.phillimore at oracle.com wrote:
>> Summary: Make offset member names consistent and private, move static
>> initializations near owning classes
>>
>> This one is better. I gave up on the X macros because they didn't
>> save typing. The changes here were to add underscores to offset
>> field names, remove _in_bytes for offset accessors and add asserts
>> that the offset is non-zero, made java_lang_ref_Reference offset
>> fields private, and moved static member definitions closer to the
>> class instead of some random place in javaClasses.cpp.
>>
>> See discussion for 8243996 Remove hardcoded field offsets for more
>> details.
>> https://mail.openjdk.java.net/pipermail/hotspot-dev/2020-May/041732.html
>>
>> Tested with tier1-6.
>>
>> open webrev at
>> http://cr.openjdk.java.net/~coleenp/2020/8245289.01/webrev
>> bug link https://bugs.openjdk.java.net/browse/JDK-8245289
>>
>> Thanks,
>> Coleen
>
> Hi Coleen,
>
> Looks good. Minor nits:
>
> share/classfile/javaClasses.hpp
> - line #239, can you add the "private" keyword back into the
> java_lang_Class class definition. Having the "private" keyword is
> consistent with how every other class is defined in the file.
I had originally taken all the 'private' out because in its absent the
data members are by default private, but then ended up only taking this
one out. I've restored it to be consistent.
> - line #887, since you are making changes to the value_offset() method
> can you change the type check for T_LONG or T_DOUBLE to call
> is_double_word_type().
Fixed!
>
> I don't have a preference concerning the discussion on the
> initialization with explicit value vs. no value for the static field
> declarations. I'm fine with pushing your patch as is.
So there were more static offset definitions *without* initializers
(default initialized) than with initializers, so I took out the
initializers, and am doing a sanity tier1 test.
Thanks,
Coleen
>
> Thanks,
> Lois
More information about the hotspot-dev
mailing list