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

Amit Kumar amitkumar at openjdk.org
Tue Mar 28 14:38:31 UTC 2023


On Mon, 27 Mar 2023 14:43:04 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 was provided by @reinrich and the RISCV port was provided by @DingliZhang and @zifeihan.
>> 
>> This change supports the following platforms: x86, aarch64, PPC, and RISCV
>
> Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision:
> 
>   RISCV patch and aarch64 improvement

`{tier1, tier2} X {fast debug, slow debug, release}` testing done for s390x. PR seems clean.
@matias9927 please include port for s390x from this commit: 
https://github.com/offamitkumar/jdk/commit/a582f32f97aefba33cebaf4ace540681dfc0eff5

Thanks

src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp line 652:

> 650:     // Scale the index to be the entry index * sizeof(ResolvedInvokeDynamicInfo)
> 651:     __ sldi(size, size, log2i_exact(sizeof(ResolvedIndyEntry)));
> 652:     __ add(cache, cache, size);

@reinrich Is there any specific reason, why you're not calling load_resolved_indy_entry() method here.  On s390x build/changes are stable even with calling that helper method.

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

Marked as reviewed by amitkumar (Author).

PR Review: https://git.openjdk.org/jdk/pull/12778#pullrequestreview-1361010070
PR Review Comment: https://git.openjdk.org/jdk/pull/12778#discussion_r1150566670


More information about the serviceability-dev mailing list