< prev index next >

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

Print this page




 278       return;
 279     }
 280     functor(map_cstring(anonymous_klass_name_hash_code((const InstanceKlass*)k)));
 281   }
 282 
 283   template <typename T>
 284   void iterate_symbols(T& functor) {
 285     _sym_table->iterate_entry(functor);
 286   }
 287 
 288   template <typename T>
 289   void iterate_cstrings(T& functor) {
 290     _cstring_table->iterate_entry(functor);
 291   }
 292 
 293   bool has_entries() const { return has_symbol_entries() || has_cstring_entries(); }
 294   bool has_symbol_entries() const { return _sym_table->has_entries(); }
 295   bool has_cstring_entries() const { return _cstring_table->has_entries(); }
 296 };
 297 
 298 // external name (synthetic) for the primordial "boot" class loader instance
 299 const char* const boot_class_loader_name = "boot";
 300 
 301 /**
 302  * When processing a set of artifacts, there will be a need
 303  * to track transitive dependencies originating with each artifact.
 304  * These might or might not be explicitly "tagged" at that point.
 305  * With the introduction of "epochs" to allow for concurrent tagging,
 306  * we attempt to avoid "tagging" an artifact to indicate its use in a
 307  * previous epoch. This is mainly to reduce the risk for data races.
 308  * Instead, JfrArtifactSet is used to track transitive dependencies
 309  * during the write process itself.
 310  *
 311  * It can also provide opportunities for caching, as the ideal should
 312  * be to reduce the amount of iterations neccessary for locating artifacts
 313  * in the respective VM subsystems.
 314  */
 315 class JfrArtifactSet : public JfrCHeapObj {
 316  private:
 317   JfrSymbolId* _symbol_id;
 318   GrowableArray<const Klass*>* _klass_list;
 319   bool _class_unload;
 320 




 278       return;
 279     }
 280     functor(map_cstring(anonymous_klass_name_hash_code((const InstanceKlass*)k)));
 281   }
 282 
 283   template <typename T>
 284   void iterate_symbols(T& functor) {
 285     _sym_table->iterate_entry(functor);
 286   }
 287 
 288   template <typename T>
 289   void iterate_cstrings(T& functor) {
 290     _cstring_table->iterate_entry(functor);
 291   }
 292 
 293   bool has_entries() const { return has_symbol_entries() || has_cstring_entries(); }
 294   bool has_symbol_entries() const { return _sym_table->has_entries(); }
 295   bool has_cstring_entries() const { return _cstring_table->has_entries(); }
 296 };
 297 



 298 /**
 299  * When processing a set of artifacts, there will be a need
 300  * to track transitive dependencies originating with each artifact.
 301  * These might or might not be explicitly "tagged" at that point.
 302  * With the introduction of "epochs" to allow for concurrent tagging,
 303  * we attempt to avoid "tagging" an artifact to indicate its use in a
 304  * previous epoch. This is mainly to reduce the risk for data races.
 305  * Instead, JfrArtifactSet is used to track transitive dependencies
 306  * during the write process itself.
 307  *
 308  * It can also provide opportunities for caching, as the ideal should
 309  * be to reduce the amount of iterations neccessary for locating artifacts
 310  * in the respective VM subsystems.
 311  */
 312 class JfrArtifactSet : public JfrCHeapObj {
 313  private:
 314   JfrSymbolId* _symbol_id;
 315   GrowableArray<const Klass*>* _klass_list;
 316   bool _class_unload;
 317 


< prev index next >