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

2023-03-27 Thread Gui Cao
On Sat, 25 Mar 2023 05:11:16 GMT, Fei Yang  wrote:

>> Matias Saavedra Silva has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Improved interpreter comments aarch64
>
> Changes requested by fyang (Reviewer).

More changes for RISC-V which resolve @RealFYang's review comments. @matias9927 
Please help integrate this
https://github.com/zifeihan/jdk/commit/413dd02221598edba9e44ee7d9b20414bde76243
(on this branch: https://github.com/zifeihan/jdk/commits/12778_riscv_port_v4)
By the way, the riscv port passed the tier1-3 tests on unmatched board with no 
new errors introduced.

-

PR Comment: https://git.openjdk.org/jdk/pull/12778#issuecomment-1484884543


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

2023-03-24 Thread Gui Cao
On Thu, 23 Mar 2023 15:37:27 GMT, Matias Saavedra Silva  
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:
> 
>   Andrew comments aarch64

Thanks, the riscv port passed the tier1-3 tests on unmatched board with no new 
errors introduced.

-

Marked as reviewed by gcao (Author).

PR Review: https://git.openjdk.org/jdk/pull/12778#pullrequestreview-1356148354


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

2023-03-23 Thread Gui Cao
On Wed, 22 Mar 2023 17:42:35 GMT, Matias Saavedra Silva  
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:
> 
>   Improved comment for load-acquire aarch64

Looks good for me. tier1, no new errors introduced, please wait for me to 
finish the tier2 and tier3 tests.

-

PR Review: https://git.openjdk.org/jdk/pull/12778#pullrequestreview-1353916818


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

2023-03-19 Thread Gui Cao
On Fri, 17 Mar 2023 22:08:23 GMT, Matias Saavedra Silva  
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:
> 
>   Fixed aarch64 and added load-acquire for resolution check

Hi,
I have updated the riscv related code by referring to the latest aarch64 
related changes, please help me to update it. and i tested hotsport , jdk's 
tier1 and no new errors were introduced
https://github.com/zifeihan/jdk/commit/9c17c5b4953eebdebc6eb84b90a2ff9ca97c78c5
(on this branch: https://github.com/zifeihan/jdk/commits/12778_riscv_port)

-

PR: https://git.openjdk.org/jdk/pull/12778


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

2023-03-14 Thread Gui Cao
On Tue, 14 Mar 2023 13:59:48 GMT, Matias Saavedra Silva  
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 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 five additional 
> commits since the last revision:
> 
>  - Typo in comment
>  - Merge branch 'master' into resolvedIndyEntry_8301995
>  - Interpreter optimization and comments
>  - PPC and RISCV port
>  - 8301995: Move invokedynamic resolution information out of the cpCache

src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp line 1843:

> 1841:   ldr(cache, Address(rcpool, 
> in_bytes(ConstantPoolCache::invokedynamic_entries_offset(;
> 1842:   // Scale the index to be the entry index * 
> sizeof(ResolvedInvokeDynamicInfo)
> 1843:   mov(tmp, sizeof(ResolvedIndyEntry));

The tmp register is not used here, is it redundant?

-

PR: https://git.openjdk.org/jdk/pull/12778


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

2023-03-14 Thread Gui Cao
On Tue, 14 Mar 2023 20:20:41 GMT, Matias Saavedra Silva  
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 port update

Changes requested by gcao (Author).

-

PR: https://git.openjdk.org/jdk/pull/12778


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

2023-03-14 Thread Gui Cao
On Tue, 14 Mar 2023 13:59:48 GMT, Matias Saavedra Silva  
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 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 five additional 
> commits since the last revision:
> 
>  - Typo in comment
>  - Merge branch 'master' into resolvedIndyEntry_8301995
>  - Interpreter optimization and comments
>  - PPC and RISCV port
>  - 8301995: Move invokedynamic resolution information out of the cpCache

Hi, 
I have updated the riscv related code by referring to the latest aarch64 
related changes, please help me to update it.
https://github.com/zifeihan/jdk/commit/ca9f110ca4eb066f828442265f43ed0d9311a9cc
(on this branch: https://github.com/zifeihan/jdk/commits/follow_12778)

@RealFYang @DingliZhang Please help review the RISCV port code.

-

PR: https://git.openjdk.org/jdk/pull/12778