src/share/vm/memory/sharedHeap.hpp

Print this page
rev 5891 : [mq]: hideDoCodeRoots


 221     SO_AllClasses          = 0x1,
 222     SO_SystemClasses       = 0x2,
 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                             CodeBlobClosure* code_roots,
 242                             KlassClosure* klass_closure);
 243 
 244   // Apply "blk" to all the weak roots of the system.  These include
 245   // JNI weak roots, the code cache, system dictionary, symbol table,
 246   // string table.
 247   void process_weak_roots(OopClosure* root_closure,
 248                           CodeBlobClosure* code_roots);
 249 
 250   // The functions below are helper functions that a subclass of
 251   // "SharedHeap" can use in the implementation of its virtual
 252   // functions.
 253 
 254 public:
 255 
 256   // Do anything common to GC's.
 257   virtual void gc_prologue(bool full) = 0;
 258   virtual void gc_epilogue(bool full) = 0;
 259 
 260   // Sets the number of parallel threads that will be doing tasks
 261   // (such as process strong roots) subsequently.
 262   virtual void set_par_threads(uint t);
 263 
 264   int n_termination();
 265   void set_n_termination(int t);
 266 
 267   //
 268   // New methods from CollectedHeap
 269   //
 270 
 271   // Some utilities.
 272   void print_size_transition(outputStream* out,
 273                              size_t bytes_before,
 274                              size_t bytes_after,
 275                              size_t capacity);
 276 };




 277 
 278 #endif // SHARE_VM_MEMORY_SHAREDHEAP_HPP


 221     SO_AllClasses          = 0x1,
 222     SO_SystemClasses       = 0x2,
 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   //
 265   // New methods from CollectedHeap
 266   //
 267 
 268   // Some utilities.
 269   void print_size_transition(outputStream* out,
 270                              size_t bytes_before,
 271                              size_t bytes_after,
 272                              size_t capacity);
 273 };
 274 
 275 inline SharedHeap::ScanningOption operator|(SharedHeap::ScanningOption so0, SharedHeap::ScanningOption so1) {
 276   return static_cast<SharedHeap::ScanningOption>(static_cast<int>(so0) | static_cast<int>(so1));
 277 }
 278 
 279 #endif // SHARE_VM_MEMORY_SHAREDHEAP_HPP