RFR: 8256072: Eliminate JVMTI tagmap rehashing [v3]
Coleen Phillimore
coleenp at openjdk.org
Thu Nov 3 12:46:03 UTC 2022
On Thu, 3 Nov 2022 11:39:51 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> 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?
I was hoping there was just a bit but you're right. I renamed it to fast_no_hash_check() and only return true if the object is unlocked and added a comment.
-------------
PR: https://git.openjdk.org/jdk/pull/10938
More information about the hotspot-dev
mailing list