RFR: 8299274: Add elements to resolved_references consistently

Coleen Phillimore coleenp at openjdk.org
Wed Jan 4 14:41:53 UTC 2023


On Wed, 4 Jan 2023 01:38:08 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> I added a resolved_references_at and set_resolved_references_at() functions to use for accesses to the resolved_references array, except for the CDS usages. This has an assert that the element is an oop and oob checks and setting elements use a CAS consistently.
>> These asserts seem useful for finding the bug causing https://bugs.openjdk.org/browse/JDK-8296915.
>> Tested with tiers1-4.
>
> src/hotspot/share/oops/constantPool.cpp line 174:
> 
>> 172: }
>> 173: 
>> 174: oop ConstantPool::resolved_references_at(int index) const {
> 
> This function should be called `resolved_reference_at` - singular - as it returns one reference. Thanks.

I have it resolved_references because that's the name of the array and I want to keep that as a string to search on.

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

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


More information about the hotspot-dev mailing list