RFR: 8243996: Remove hardcoded field offsets from HotSpot
Erik Österlund
erik.osterlund at oracle.com
Thu May 14 12:07:46 UTC 2020
>> I'm trying to move the pre-existing various offset style
>> inconsistencies of JavaClasses
>> (50-50 use of leading '_', sometimes using accessors, sometimes being
>> public, sometimes
>> asserting offsets are initialized, etc) into a new RFR. I think there
>> is plenty of weirdness there
>> and don't think fixing it belongs to this change.
>
> Oh I thought the additional change should only apply to the fields of
> java_lang_ref_Reference class which are public, but I'm fine with a
> future RFE.
Thanks Coleen!
/Erik
> Coleen
>>
>>> I was going to reply to this thread "Looks good to me" and thanks
>>> for adding the comments.
>>
>> Thanks!
>>
>> /Erik
>>
>>> Coleen
>>>>
>>>> — John
>>>>
>>>>> On May 13, 2020, at 8:26 AM, Erik Österlund
>>>>> <erik.osterlund at oracle.com> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> Let's remove hardcoded field offsets. Main trick to get this done
>>>>> is to split interpreter initialization
>>>>> into two parts: 1. reserve the interpreter memory, 2. generate the
>>>>> interpreter. This allows reserving
>>>>> it before loading methods (which generates i2c adapters that
>>>>> assert things are "in the interpreter",
>>>>> requiring knowledge about its address range), and then load the
>>>>> methods, and then generate the interpreter.
>>>>> This moving of interpreter code generation until after methods
>>>>> have been loaded allows offsets to be
>>>>> looked up, needed by code generation. That way, we no longer need
>>>>> to hardcode field offsets, which
>>>>> makes it less annoying to change the field layout code in the future.
>>>>>
>>>>> Thanks to Coleen for pre-reviewing this.
>>>>>
>>>>> Bug:
>>>>> https://bugs.openjdk.java.net/browse/JDK-8243996
>>>>>
>>>>> Webrev:
>>>>> http://cr.openjdk.java.net/~eosterlund/8243996/webrev.01/
>>>>>
>>>>> Thanks,
>>>>> /Erik
>>>
>>
>
More information about the hotspot-dev
mailing list