src/share/vm/memory/sharedHeap.hpp

Print this page




 223     SO_Strings             = 0x4,
 224     SO_AllCodeCache        = 0x8,
 225     SO_ScavengeCodeCache   = 0x10
 226   };
 227 
 228   FlexibleWorkGang* workers() const { return _workers; }
 229 
 230   // Invoke the "do_oop" method the closure "roots" on all root locations.
 231   // The "so" argument determines which roots the closure is applied to:
 232   // "SO_None" does none;
 233   // "SO_AllClasses" applies the closure to all entries in the SystemDictionary;
 234   // "SO_SystemClasses" to all the "system" classes and loaders;
 235   // "SO_Strings" applies the closure to all entries in StringTable;
 236   // "SO_AllCodeCache" applies the closure to all elements of the CodeCache.
 237   // "SO_ScavengeCodeCache" applies the closure to elements on the scavenge root list in the CodeCache.
 238   void process_strong_roots(bool activate_scope,
 239                             ScanningOption so,
 240                             OopClosure* roots,
 241                             KlassClosure* klass_closure);
 242 
 243   // Apply "root_closure" to all the weak roots of the system.
 244   // These include JNI weak roots and string table.
 245   void process_weak_roots(OopClosure* root_closure);
 246 
 247   // The functions below are helper functions that a subclass of
 248   // "SharedHeap" can use in the implementation of its virtual
 249   // functions.
 250 
 251 public:
 252 
 253   // Do anything common to GC's.
 254   virtual void gc_prologue(bool full) = 0;
 255   virtual void gc_epilogue(bool full) = 0;
 256 
 257   // Sets the number of parallel threads that will be doing tasks
 258   // (such as process strong roots) subsequently.
 259   virtual void set_par_threads(uint t);
 260 
 261   int n_termination();
 262   void set_n_termination(int t);
 263 
 264   //


 223     SO_Strings             = 0x4,
 224     SO_AllCodeCache        = 0x8,
 225     SO_ScavengeCodeCache   = 0x10
 226   };
 227 
 228   FlexibleWorkGang* workers() const { return _workers; }
 229 
 230   // Invoke the "do_oop" method the closure "roots" on all root locations.
 231   // The "so" argument determines which roots the closure is applied to:
 232   // "SO_None" does none;
 233   // "SO_AllClasses" applies the closure to all entries in the SystemDictionary;
 234   // "SO_SystemClasses" to all the "system" classes and loaders;
 235   // "SO_Strings" applies the closure to all entries in StringTable;
 236   // "SO_AllCodeCache" applies the closure to all elements of the CodeCache.
 237   // "SO_ScavengeCodeCache" applies the closure to elements on the scavenge root list in the CodeCache.
 238   void process_strong_roots(bool activate_scope,
 239                             ScanningOption so,
 240                             OopClosure* roots,
 241                             KlassClosure* klass_closure);
 242 
 243   // Apply "root_closure" to the JNI weak roots..

 244   void process_weak_roots(OopClosure* root_closure);
 245 
 246   // The functions below are helper functions that a subclass of
 247   // "SharedHeap" can use in the implementation of its virtual
 248   // functions.
 249 
 250 public:
 251 
 252   // Do anything common to GC's.
 253   virtual void gc_prologue(bool full) = 0;
 254   virtual void gc_epilogue(bool full) = 0;
 255 
 256   // Sets the number of parallel threads that will be doing tasks
 257   // (such as process strong roots) subsequently.
 258   virtual void set_par_threads(uint t);
 259 
 260   int n_termination();
 261   void set_n_termination(int t);
 262 
 263   //