RFR: 8243996: Remove hardcoded field offsets from HotSpot

Erik Österlund erik.osterlund at oracle.com
Thu May 14 09:32:44 UTC 2020


Hi Fred,

Thanks for the review. I am hoping to move change of accessibility as 
well as some other
random inconsistencies regarding the field offsets to a new RFR instead. 
Let's see how
that goes.

Thanks,
/Erik

On 2020-05-13 20:23, Frederic Parain wrote:
> Erik,
>
> Thank you for fixing this long standing technical debt.
> Looks good to me, comments are very helpful.
> If you change accessibility as suggested by John, let
> me know if you need another review.
>
> Regards,
>
> Fred
>
>> On May 13, 2020, at 11:26, 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