< prev index next >

src/hotspot/share/oops/klass.hpp

8201436: Replace oop_ps_push_contents with oop_iterate and closure

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

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