234 bool equals(const Symbol* query, uintptr_t hash, const SymbolEntry* entry); |
234 bool equals(const Symbol* query, uintptr_t hash, const SymbolEntry* entry); |
235 void assign_id(CStringEntry* entry); |
235 void assign_id(CStringEntry* entry); |
236 bool equals(const char* query, uintptr_t hash, const CStringEntry* entry); |
236 bool equals(const char* query, uintptr_t hash, const CStringEntry* entry); |
237 |
237 |
238 public: |
238 public: |
239 static bool is_anonymous_klass(const Klass* k); |
239 static bool is_unsafe_anonymous_klass(const Klass* k); |
240 static const char* create_anonymous_klass_symbol(const InstanceKlass* ik, uintptr_t& hashcode); |
240 static const char* create_unsafe_anonymous_klass_symbol(const InstanceKlass* ik, uintptr_t& hashcode); |
241 static uintptr_t anonymous_klass_name_hash_code(const InstanceKlass* ik); |
241 static uintptr_t unsafe_anonymous_klass_name_hash_code(const InstanceKlass* ik); |
242 static uintptr_t regular_klass_name_hash_code(const Klass* k); |
242 static uintptr_t regular_klass_name_hash_code(const Klass* k); |
243 |
243 |
244 JfrSymbolId(); |
244 JfrSymbolId(); |
245 ~JfrSymbolId(); |
245 ~JfrSymbolId(); |
246 |
246 |
247 void initialize(); |
247 void initialize(); |
248 void clear(); |
248 void clear(); |
249 |
249 |
250 traceid mark_anonymous_klass_name(const Klass* k); |
250 traceid mark_unsafe_anonymous_klass_name(const Klass* k); |
251 traceid mark(const Symbol* sym, uintptr_t hash); |
251 traceid mark(const Symbol* sym, uintptr_t hash); |
252 traceid mark(const Klass* k); |
252 traceid mark(const Klass* k); |
253 traceid mark(const Symbol* symbol); |
253 traceid mark(const Symbol* symbol); |
254 traceid mark(const char* str, uintptr_t hash); |
254 traceid mark(const char* str, uintptr_t hash); |
255 |
255 |
257 const SymbolEntry* map_symbol(uintptr_t hash) const; |
257 const SymbolEntry* map_symbol(uintptr_t hash) const; |
258 const CStringEntry* map_cstring(uintptr_t hash) const; |
258 const CStringEntry* map_cstring(uintptr_t hash) const; |
259 |
259 |
260 template <typename T> |
260 template <typename T> |
261 void symbol(T& functor, const Klass* k) { |
261 void symbol(T& functor, const Klass* k) { |
262 if (is_anonymous_klass(k)) { |
262 if (is_unsafe_anonymous_klass(k)) { |
263 return; |
263 return; |
264 } |
264 } |
265 functor(map_symbol(regular_klass_name_hash_code(k))); |
265 functor(map_symbol(regular_klass_name_hash_code(k))); |
266 } |
266 } |
267 |
267 |
272 functor(map_symbol((uintptr_t)method->signature()->identity_hash())); |
272 functor(map_symbol((uintptr_t)method->signature()->identity_hash())); |
273 } |
273 } |
274 |
274 |
275 template <typename T> |
275 template <typename T> |
276 void cstring(T& functor, const Klass* k) { |
276 void cstring(T& functor, const Klass* k) { |
277 if (!is_anonymous_klass(k)) { |
277 if (!is_unsafe_anonymous_klass(k)) { |
278 return; |
278 return; |
279 } |
279 } |
280 functor(map_cstring(anonymous_klass_name_hash_code((const InstanceKlass*)k))); |
280 functor(map_cstring(unsafe_anonymous_klass_name_hash_code((const InstanceKlass*)k))); |
281 } |
281 } |
282 |
282 |
283 template <typename T> |
283 template <typename T> |
284 void iterate_symbols(T& functor) { |
284 void iterate_symbols(T& functor) { |
285 _sym_table->iterate_entry(functor); |
285 _sym_table->iterate_entry(functor); |
325 |
325 |
326 traceid mark(const Symbol* sym, uintptr_t hash); |
326 traceid mark(const Symbol* sym, uintptr_t hash); |
327 traceid mark(const Klass* klass); |
327 traceid mark(const Klass* klass); |
328 traceid mark(const Symbol* symbol); |
328 traceid mark(const Symbol* symbol); |
329 traceid mark(const char* const str, uintptr_t hash); |
329 traceid mark(const char* const str, uintptr_t hash); |
330 traceid mark_anonymous_klass_name(const Klass* klass); |
330 traceid mark_unsafe_anonymous_klass_name(const Klass* klass); |
331 |
331 |
332 const JfrSymbolId::SymbolEntry* map_symbol(const Symbol* symbol) const; |
332 const JfrSymbolId::SymbolEntry* map_symbol(const Symbol* symbol) const; |
333 const JfrSymbolId::SymbolEntry* map_symbol(uintptr_t hash) const; |
333 const JfrSymbolId::SymbolEntry* map_symbol(uintptr_t hash) const; |
334 const JfrSymbolId::CStringEntry* map_cstring(uintptr_t hash) const; |
334 const JfrSymbolId::CStringEntry* map_cstring(uintptr_t hash) const; |
335 |
335 |