On Tue, 29 Nov 2022 23:07:15 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:
>> 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"); > } I didn't notice the suggested name (`replace()`), so It is implemented as `update()` method. It is tested locally by running tests vmTestbse/nsk/jvmti and vmTEstbase//nck/jdi. tier1-5 are also passed. ------------- PR: https://git.openjdk.org/jdk/pull/11288