652 JFR_ONLY(DEFINE_TRACE_ID_METHODS;)
653
654 virtual void metaspace_pointers_do(MetaspaceClosure* iter);
655 virtual MetaspaceObj::Type type() const { return ClassType; }
656
657 // Iff the class loader (or mirror for unsafe anonymous classes) is alive the
658 // Klass is considered alive. This is safe to call before the CLD is marked as
659 // unloading, and hence during concurrent class unloading.
660 bool is_loader_alive() const { return class_loader_data()->is_alive(); }
661
662 // Load the klass's holder as a phantom. This is useful when a weak Klass
663 // pointer has been "peeked" and then must be kept alive before it may
664 // be used safely.
665 oop holder_phantom() const;
666
667 static void clean_weak_klass_links(bool unloading_occurred, bool clean_alive_klasses = true);
668 static void clean_subklass_tree() {
669 clean_weak_klass_links(/*unloading_occurred*/ true , /* clean_alive_klasses */ false);
670 }
671
672 // GC specific object visitors
673 //
674 #if INCLUDE_PARALLELGC
675 // Parallel Compact
676 virtual void oop_pc_update_pointers(oop obj, ParCompactionManager* cm) = 0;
677 #endif
678
679 virtual void array_klasses_do(void f(Klass* k)) {}
680
681 // Return self, except for abstract classes with exactly 1
682 // implementor. Then return the 1 concrete implementation.
683 Klass *up_cast_abstract();
684
685 // klass name
686 Symbol* name() const { return _name; }
687 void set_name(Symbol* n);
688
689 public:
690 // jvm support
691 virtual jint compute_modifier_flags(TRAPS) const;
692
693 // JVMTI support
694 virtual jint jvmti_class_status() const;
695
696 // Printing
697 virtual void print_on(outputStream* st) const;
|
652 JFR_ONLY(DEFINE_TRACE_ID_METHODS;)
653
654 virtual void metaspace_pointers_do(MetaspaceClosure* iter);
655 virtual MetaspaceObj::Type type() const { return ClassType; }
656
657 // Iff the class loader (or mirror for unsafe anonymous classes) is alive the
658 // Klass is considered alive. This is safe to call before the CLD is marked as
659 // unloading, and hence during concurrent class unloading.
660 bool is_loader_alive() const { return class_loader_data()->is_alive(); }
661
662 // Load the klass's holder as a phantom. This is useful when a weak Klass
663 // pointer has been "peeked" and then must be kept alive before it may
664 // be used safely.
665 oop holder_phantom() const;
666
667 static void clean_weak_klass_links(bool unloading_occurred, bool clean_alive_klasses = true);
668 static void clean_subklass_tree() {
669 clean_weak_klass_links(/*unloading_occurred*/ true , /* clean_alive_klasses */ false);
670 }
671
672 virtual void array_klasses_do(void f(Klass* k)) {}
673
674 // Return self, except for abstract classes with exactly 1
675 // implementor. Then return the 1 concrete implementation.
676 Klass *up_cast_abstract();
677
678 // klass name
679 Symbol* name() const { return _name; }
680 void set_name(Symbol* n);
681
682 public:
683 // jvm support
684 virtual jint compute_modifier_flags(TRAPS) const;
685
686 // JVMTI support
687 virtual jint jvmti_class_status() const;
688
689 // Printing
690 virtual void print_on(outputStream* st) const;
|