RFR: 8292741: Convert JvmtiTagMapTable to ResourceHashtable
Coleen Phillimore
coleenp at openjdk.org
Thu Dec 1 09:37:40 UTC 2022
On Mon, 28 Nov 2022 22:14:06 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> add() is supposed to add a new object with tag. There is an assert() in its body that checks it. By removing the assert, add() can be used for updating as well.
>
> Are you suggesting that `add` can also act as a `replace` operation? I would think we would want a separate method for that.
Yes, this could have a replace operation that does below which would be better:
void JvmtiTagMapTable::replace(oop o, jlong tag) {
JvmtiTagMapEntry key(o);
bool is_added = _rrht_table.put(new_entry, tag);
assert(!is_added, "should not be added");
}
-------------
PR: https://git.openjdk.org/jdk/pull/11288
More information about the serviceability-dev
mailing list