@@ -50,7 +50,7 @@ JvmtiTagMapKey::JvmtiTagMapKey(const JvmtiTagMapKey& src) {
50
50
_obj = nullptr ;
51
51
}
52
52
53
- void JvmtiTagMapKey::release_weak_handle () const {
53
+ void JvmtiTagMapKey::release_weak_handle () {
54
54
_wh.release (JvmtiExport::weak_tag_storage ());
55
55
}
56
56
@@ -71,7 +71,7 @@ JvmtiTagMapTable::JvmtiTagMapTable() : _table(INITIAL_TABLE_SIZE, MAX_TABLE_SIZE
71
71
72
72
void JvmtiTagMapTable::clear () {
73
73
struct RemoveAll {
74
- bool do_entry (const JvmtiTagMapKey& entry, const jlong& tag) {
74
+ bool do_entry (JvmtiTagMapKey& entry, const jlong& tag) {
75
75
entry.release_weak_handle ();
76
76
return true ;
77
77
}
@@ -125,7 +125,7 @@ void JvmtiTagMapTable::add(oop obj, jlong tag) {
125
125
126
126
void JvmtiTagMapTable::remove (oop obj) {
127
127
JvmtiTagMapKey jtme (obj);
128
- auto clean = [] (const JvmtiTagMapKey& entry, jlong tag) {
128
+ auto clean = [] (JvmtiTagMapKey& entry, jlong tag) {
129
129
entry.release_weak_handle ();
130
130
};
131
131
_table.remove (jtme, clean);
@@ -139,7 +139,7 @@ void JvmtiTagMapTable::remove_dead_entries(GrowableArray<jlong>* objects) {
139
139
struct IsDead {
140
140
GrowableArray<jlong>* _objects;
141
141
IsDead (GrowableArray<jlong>* objects) : _objects(objects) {}
142
- bool do_entry (const JvmtiTagMapKey& entry, jlong tag) {
142
+ bool do_entry (JvmtiTagMapKey& entry, jlong tag) {
143
143
if (entry.object_no_keepalive () == nullptr ) {
144
144
if (_objects != nullptr ) {
145
145
_objects->append (tag);
0 commit comments