src/share/vm/jfr/recorder/checkpoint/types/jfrTypeSetUtils.hpp

changeset 9926
d20a5f399218
parent 9858
b985cbb00e68
equal deleted inserted replaced
9925:30fb8c8cceb9 9926:d20a5f399218
228 typedef HashTableHost<const char*, traceid, Entry, JfrSymbolId> CStringTable; 228 typedef HashTableHost<const char*, traceid, Entry, JfrSymbolId> CStringTable;
229 public: 229 public:
230 typedef SymbolTable::HashEntry SymbolEntry; 230 typedef SymbolTable::HashEntry SymbolEntry;
231 typedef CStringTable::HashEntry CStringEntry; 231 typedef CStringTable::HashEntry CStringEntry;
232 private: 232 private:
233 traceid _symbol_id_counter;
233 SymbolTable* _sym_table; 234 SymbolTable* _sym_table;
234 CStringTable* _cstring_table; 235 CStringTable* _cstring_table;
235 traceid _symbol_id_counter; 236 CStringTable* _pkg_table;
236 237
237 // hashtable(s) callbacks 238 // hashtable(s) callbacks
238 void assign_id(SymbolEntry* entry); 239 void assign_id(SymbolEntry* entry);
239 bool equals(const Symbol* query, uintptr_t hash, const SymbolEntry* entry); 240 bool equals(const Symbol* query, uintptr_t hash, const SymbolEntry* entry);
240 void assign_id(CStringEntry* entry); 241 void assign_id(CStringEntry* entry);
255 traceid mark_anonymous_klass_name(const Klass* k); 256 traceid mark_anonymous_klass_name(const Klass* k);
256 traceid mark(const Symbol* sym, uintptr_t hash); 257 traceid mark(const Symbol* sym, uintptr_t hash);
257 traceid mark(const Klass* k); 258 traceid mark(const Klass* k);
258 traceid mark(const Symbol* symbol); 259 traceid mark(const Symbol* symbol);
259 traceid mark(const char* str, uintptr_t hash); 260 traceid mark(const char* str, uintptr_t hash);
261 traceid markPackage(const char* name, uintptr_t hash);
262
263 template <typename T>
264 void iterate_packages(T& functor) {
265 _pkg_table->iterate_entry(functor);
266 }
260 267
261 const SymbolEntry* map_symbol(const Symbol* symbol) const; 268 const SymbolEntry* map_symbol(const Symbol* symbol) const;
262 const SymbolEntry* map_symbol(uintptr_t hash) const; 269 const SymbolEntry* map_symbol(uintptr_t hash) const;
263 const CStringEntry* map_cstring(uintptr_t hash) const; 270 const CStringEntry* map_cstring(uintptr_t hash) const;
264 271
332 traceid mark(const Klass* klass); 339 traceid mark(const Klass* klass);
333 traceid mark(const Symbol* symbol); 340 traceid mark(const Symbol* symbol);
334 traceid mark(const char* const str, uintptr_t hash); 341 traceid mark(const char* const str, uintptr_t hash);
335 traceid mark_anonymous_klass_name(const Klass* klass); 342 traceid mark_anonymous_klass_name(const Klass* klass);
336 343
344 traceid markPackage(const char* const name, uintptr_t hash);
345
337 const JfrSymbolId::SymbolEntry* map_symbol(const Symbol* symbol) const; 346 const JfrSymbolId::SymbolEntry* map_symbol(const Symbol* symbol) const;
338 const JfrSymbolId::SymbolEntry* map_symbol(uintptr_t hash) const; 347 const JfrSymbolId::SymbolEntry* map_symbol(uintptr_t hash) const;
339 const JfrSymbolId::CStringEntry* map_cstring(uintptr_t hash) const; 348 const JfrSymbolId::CStringEntry* map_cstring(uintptr_t hash) const;
340 349
341 bool has_klass_entries() const; 350 bool has_klass_entries() const;
358 367
359 template <typename T> 368 template <typename T>
360 void iterate_cstrings(T& functor) { 369 void iterate_cstrings(T& functor) {
361 _symbol_id->iterate_cstrings(functor); 370 _symbol_id->iterate_cstrings(functor);
362 } 371 }
372
373 template <typename T>
374 void iterate_packages(T& functor) {
375 _symbol_id->iterate_packages(functor);
376 }
363 }; 377 };
364 378
365 class KlassArtifactRegistrator { 379 class KlassArtifactRegistrator {
366 private: 380 private:
367 JfrArtifactSet* _artifacts; 381 JfrArtifactSet* _artifacts;

mercurial