RFR: 8301995: Move invokedynamic resolution information out of ConstantPoolCacheEntry [v15]

Lutz Schmidt lucy at openjdk.org
Tue Mar 28 16:52:41 UTC 2023


On Tue, 28 Mar 2023 15:00:14 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:

>> The current structure used to store the resolution information for invokedynamic, ConstantPoolCacheEntry, is difficult to interpret due to its ambigious fields f1 and f2. This structure can hold information for fields, methods, and invokedynamics and each of its fields can hold different types of values depending on the entry. 
>> 
>> This enhancement proposes a new structure to exclusively contain invokedynamic information in a manner that is easy to interpret and easy to extend.  Resolved invokedynamic entries will be stored in an array in the constant pool cache and the operand of the invokedynamic bytecode will be rewritten to be the index into this array.
>> 
>> Any areas that previously accessed invokedynamic data from ConstantPoolCacheEntry will be replaced with accesses to this new array and structure. Verified with tier1-9 tests.
>> 
>> The PPC port was provided by @reinrich, RISCV was provided by @DingliZhang and @zifeihan, and S390x by @offamitkumar.
>> 
>> This change supports the following platforms: x86, aarch64, PPC, RISCV, and S390x
>
> Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision:
> 
>   s390 update

s390 changes look good. 
Thank you, Amit, for working hard to get this done.

src/hotspot/cpu/s390/templateTable_s390.cpp line 2432:

> 2430: 
> 2431:   // The invokedynamic is unresolved iff method is NULL
> 2432:   __ z_clgij(method, 0, Assembler::bcondNotEqual, resolved); // method != 0, jump to resolved

In the light of the ongoing effort to substitute all occurrences of NULL (and (void*)0) with nullptr, you may want to substitute 0 with (unsigned long)nullptr here.

src/hotspot/cpu/s390/templateTable_s390.cpp line 2442:

> 2440:   __ z_lg(method, Address(cache, in_bytes(ResolvedIndyEntry::method_offset())));
> 2441: #ifdef ASSERT
> 2442:   __ z_clgij(method, 0, Assembler::bcondNotEqual, resolved); // method != 0, jump to resolved

Same as above.

-------------

Marked as reviewed by lucy (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/12778#pullrequestreview-1361535849
PR Review Comment: https://git.openjdk.org/jdk/pull/12778#discussion_r1150904328
PR Review Comment: https://git.openjdk.org/jdk/pull/12778#discussion_r1150904861


More information about the serviceability-dev mailing list