< prev index next >

src/hotspot/share/oops/klass.hpp

8211446: Replace oop_pc_follow_contents with oop_iterate and closure

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_follow_contents(oop obj, ParCompactionManager* cm) = 0;                                              
677   virtual void oop_pc_update_pointers(oop obj, ParCompactionManager* cm) = 0;                                              
678 #endif                                                                                                                     
679 
680   virtual void array_klasses_do(void f(Klass* k)) {}                                                                       
681 
682   // Return self, except for abstract classes with exactly 1                                                               
683   // implementor.  Then return the 1 concrete implementation.                                                              
684   Klass *up_cast_abstract();                                                                                               
685 
686   // klass name                                                                                                            
687   Symbol* name() const                   { return _name; }                                                                 
688   void set_name(Symbol* n);                                                                                                
689 
690  public:                                                                                                                   
691   // jvm support                                                                                                           
692   virtual jint compute_modifier_flags(TRAPS) const;                                                                        
693 
694   // JVMTI support                                                                                                         
695   virtual jint jvmti_class_status() const;                                                                                 

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;
< prev index next >