< prev index next >

src/share/vm/classfile/classLoaderData.hpp

Print this page

        

*** 30,41 **** #include "memory/metaspace.hpp" #include "memory/metaspaceCounters.hpp" #include "runtime/mutex.hpp" #include "utilities/growableArray.hpp" #include "utilities/macros.hpp" ! #if INCLUDE_TRACE ! #include "utilities/ticks.hpp" #endif // // A class loader represents a linkset. Conceptually, a linkset identifies // the complete transitive closure of resolved links that a dynamic linker can --- 30,41 ---- #include "memory/metaspace.hpp" #include "memory/metaspaceCounters.hpp" #include "runtime/mutex.hpp" #include "utilities/growableArray.hpp" #include "utilities/macros.hpp" ! #if INCLUDE_JFR ! #include "jfr/support/jfrTraceIdExtension.hpp" #endif // // A class loader represents a linkset. Conceptually, a linkset identifies // the complete transitive closure of resolved links that a dynamic linker can
*** 68,78 **** static ClassLoaderData* _saved_head; static ClassLoaderData* _saved_unloading; static bool _should_purge; static ClassLoaderData* add(Handle class_loader, bool anonymous, TRAPS); - static void post_class_unload_events(void); static void clean_metaspaces(); public: static ClassLoaderData* find_or_create(Handle class_loader, TRAPS); static void purge(); static void clear_claimed_marks(); --- 68,77 ----
*** 80,89 **** --- 79,89 ---- static void oops_do(OopClosure* f, KlassClosure* klass_closure, bool must_claim); static void keep_alive_oops_do(OopClosure* blk, KlassClosure* klass_closure, bool must_claim); static void always_strong_oops_do(OopClosure* blk, KlassClosure* klass_closure, bool must_claim); // cld do static void cld_do(CLDClosure* cl); + static void cld_unloading_do(CLDClosure* cl); static void roots_cld_do(CLDClosure* strong, CLDClosure* weak); static void keep_alive_cld_do(CLDClosure* cl); static void always_strong_cld_do(CLDClosure* cl); // klass do static void classes_do(KlassClosure* klass_closure);
*** 114,129 **** static bool unload_list_contains(const void* x); #ifndef PRODUCT static bool contains_loader_data(ClassLoaderData* loader_data); #endif - - #if INCLUDE_TRACE - private: - static Ticks _class_unload_time; - static void class_unload_event(Klass* const k); - #endif }; // ClassLoaderData class class ClassLoaderData : public CHeapObj<mtClass> { --- 114,123 ----
*** 211,235 **** // ReadOnly and ReadWrite metaspaces (static because only on the null // class loader for now). static Metaspace* _ro_metaspace; static Metaspace* _rw_metaspace; void set_next(ClassLoaderData* next) { _next = next; } ClassLoaderData* next() const { return _next; } ClassLoaderData(Handle h_class_loader, bool is_anonymous, Dependencies dependencies); ~ClassLoaderData(); void set_metaspace(Metaspace* m) { _metaspace = m; } Mutex* metaspace_lock() const { return _metaspace_lock; } - // GC interface. - void clear_claimed() { _claimed = 0; } - bool claimed() const { return _claimed == 1; } - bool claim(); - void unload(); bool keep_alive() const { return _keep_alive; } void classes_do(void f(Klass*)); void loaded_classes_do(KlassClosure* klass_closure); void classes_do(void f(InstanceKlass*)); --- 205,226 ---- // ReadOnly and ReadWrite metaspaces (static because only on the null // class loader for now). static Metaspace* _ro_metaspace; static Metaspace* _rw_metaspace; + JFR_ONLY(DEFINE_TRACE_ID_FIELD;) + void set_next(ClassLoaderData* next) { _next = next; } ClassLoaderData* next() const { return _next; } ClassLoaderData(Handle h_class_loader, bool is_anonymous, Dependencies dependencies); ~ClassLoaderData(); void set_metaspace(Metaspace* m) { _metaspace = m; } Mutex* metaspace_lock() const { return _metaspace_lock; } void unload(); bool keep_alive() const { return _keep_alive; } void classes_do(void f(Klass*)); void loaded_classes_do(KlassClosure* klass_closure); void classes_do(void f(InstanceKlass*));
*** 240,249 **** --- 231,245 ---- // Allocate out of this class loader data MetaWord* allocate(size_t size); public: + // GC interface. + void clear_claimed() { _claimed = 0; } + bool claimed() const { return _claimed == 1; } + bool claim(); + bool is_alive(BoolObjectClosure* is_alive_closure) const; // Accessors Metaspace* metaspace_or_null() const { return _metaspace; }
*** 323,332 **** --- 319,330 ---- // CDS support Metaspace* ro_metaspace(); Metaspace* rw_metaspace(); void initialize_shared_metaspaces(); + + JFR_ONLY(DEFINE_TRACE_ID_METHODS;) }; // An iterator that distributes Klasses to parallel worker threads. class ClassLoaderDataGraphKlassIteratorAtomic : public StackObj { Klass* volatile _next_klass;
< prev index next >