@@ -148,37 +148,30 @@ class HeapShared: AllStatic {
148148 static DumpedInternedStrings *_dumped_interned_strings;
149149
150150public:
151- static bool oop_equals (oop const & p1, oop const & p2) {
152- return p1 == p2;
153- }
154151 static unsigned oop_hash (oop const & p);
155152 static unsigned string_oop_hash (oop const & string) {
156153 return java_lang_String::hash_code (string);
157154 }
158155
159156private:
160157 typedef ResourceHashtable<oop, oop,
161- HeapShared::oop_hash,
162- HeapShared::oop_equals,
163158 15889 , // prime number
164- ResourceObj::C_HEAP> ArchivedObjectCache;
159+ ResourceObj::C_HEAP,
160+ mtClassShared,
161+ HeapShared::oop_hash> ArchivedObjectCache;
165162 static ArchivedObjectCache* _archived_object_cache;
166163
167- static bool klass_equals (Klass* const & p1, Klass* const & p2) {
168- return primitive_equals<Klass*>(p1, p2);
169- }
170-
171164 static unsigned klass_hash (Klass* const & klass) {
172165 // Generate deterministic hashcode even if SharedBaseAddress is changed due to ASLR.
173166 return primitive_hash<address>(address (klass) - SharedBaseAddress);
174167 }
175168
176169 class DumpTimeKlassSubGraphInfoTable
177170 : public ResourceHashtable<Klass*, KlassSubGraphInfo,
178- HeapShared::klass_hash,
179- HeapShared::klass_equals,
180171 137 , // prime number
181- ResourceObj::C_HEAP> {
172+ ResourceObj::C_HEAP,
173+ mtClassShared,
174+ HeapShared::klass_hash> {
182175 public:
183176 int _count;
184177 };
@@ -230,10 +223,10 @@ class HeapShared: AllStatic {
230223 static int _narrow_oop_shift;
231224
232225 typedef ResourceHashtable<oop, bool ,
233- HeapShared::oop_hash,
234- HeapShared::oop_equals,
235226 15889 , // prime number
236- ResourceObj::C_HEAP> SeenObjectsTable;
227+ ResourceObj::C_HEAP,
228+ mtClassShared,
229+ HeapShared::oop_hash> SeenObjectsTable;
237230
238231 static SeenObjectsTable *_seen_objects_table;
239232
@@ -400,10 +393,10 @@ class HeapShared: AllStatic {
400393#if INCLUDE_CDS_JAVA_HEAP
401394class DumpedInternedStrings :
402395 public ResourceHashtable<oop, bool ,
403- HeapShared::string_oop_hash,
404- HeapShared::oop_equals,
405396 15889 , // prime number
406- ResourceObj::C_HEAP>
397+ ResourceObj::C_HEAP,
398+ mtClassShared,
399+ HeapShared::string_oop_hash>
407400{};
408401#endif
409402
0 commit comments