RFR: 8264268: Don't use oop types for derived pointers [v2]
Kim Barrett
kbarrett at openjdk.java.net
Mon Mar 29 09:36:01 UTC 2021
On Mon, 29 Mar 2021 09:26:18 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> The JIT compiler embeds pointers to addresses within an object. These are called derived pointers. When the GC moves objects, these pointers need to be updated explicitly, because the GC only deals with the real oops of the objects (base pointer).
>>
>> The code that deals with this uses oop* for the address containing the base pointer. This is fine, the address contains an oop. However, it also uses oop* for the interior pointer, even though the contents is not a valid oop.
>>
>> This creates temporary oops that does not conform to the normal requirements for oops. For example, the lower three bits could be set. This makes it problematic to write stricter verification code.
>>
>> I propose that we use intptr_t* instead of oop*, and only use oop* when the location is known to contain a valid oop.
>
> Stefan Karlsson has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
>
> - star alignment cleanup
> - Merge remote-tracking branch 'origin/master' into 8264268_dervied_pointer_types
> - Add static assert
> - Cleanups
> - derived_pointer enum class
> - 8264268: Don't use oop types for derived pointers
Marked as reviewed by kbarrett (Reviewer).
-------------
PR: https://git.openjdk.java.net/jdk/pull/3214
More information about the hotspot-dev
mailing list