RFR: 8256072: Eliminate JVMTI tagmap rehashing [v3]

Coleen Phillimore coleenp at openjdk.org
Thu Nov 3 11:50:56 UTC 2022


On Thu, 3 Nov 2022 05:28:23 GMT, Erik Österlund <eosterlund at openjdk.org> 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


More information about the serviceability-dev mailing list