On Thu, 3 Nov 2022 05:28:23 GMT, Erik Österlund <[email protected]> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Remove now-unused function that I missed.
>
> src/hotspot/share/prims/jvmtiTagMapTable.cpp line 116:
>
>> 114:
>> 115: JvmtiTagMapEntry* JvmtiTagMapTable::find(oop obj) {
>> 116: if (obj->has_no_hash()) {
>
> This new function you added checks if the markWord has a hashCode. If there
> is a displaced markWord, then it very well might be that there is a hashCode,
> but it is in the displaced markWord - either in a stack lock or an
> ObjectMonitor. Bailing here does not seem correct, as it might actually be in
> the table even if there is no hashCode in the markWord. Is this an
> optimization?
It is an optimization. I don't think we want to create an identity hash for
all oops just for lookup. Is there a better way to find if an oop hashCode?
-------------
PR: https://git.openjdk.org/jdk/pull/10938