RFR: 8292741: Convert JvmtiTagMapTable to ResourceHashtable

Afshin Zafari duke at openjdk.org
Mon Nov 28 11:50:35 UTC 2022


On Mon, 28 Nov 2022 01:23:30 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> test of tier1-5 passed.
>
> src/hotspot/share/prims/jvmtiTagMapTable.cpp line 95:
> 
>> 93:    //if (obj->fast_no_hash_check()) {
>> 94:    //  return 0;
>> 95:    //} else {
> 
> What are these comments?

Coleen's suggestion for efficiency reasons.

> src/hotspot/share/prims/jvmtiTagMapTable.cpp line 102:
> 
>> 100:  }
>> 101: 
>> 102: bool JvmtiTagMapTable::add(oop obj, jlong tag) {
> 
> I'm not seeing that a return value has any use here when it is always expected to be true.

ResourceHashTable::put() returns true if the Key,Value is added, false if the Value is updated.

> src/hotspot/share/prims/jvmtiTagMapTable.cpp line 123:
> 
>> 121: 
>> 122: void JvmtiTagMapTable::remove_dead_entries(GrowableArray<jlong>* objects) {
>> 123:   struct IsDead{
> 
> Nit: space before {
> 
> Same query about using a local struct for this.

Alternative for struct?

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

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


More information about the hotspot-dev mailing list