< prev index next >

src/share/vm/gc/shared/genCollectedHeap.hpp

Print this page
rev 11983 : 8166276: Refactor gen_process_roots to allow simpler fix for 8165949
Reviewed-by:
Contributed-by: jesper.wilhelmsson@oracle.com


 385   // excess storage retention.)
 386   // The "so" argument determines which of the roots
 387   // the closure is applied to:
 388   // "SO_None" does none;
 389   enum ScanningOption {
 390     SO_None                =  0x0,
 391     SO_AllCodeCache        =  0x8,
 392     SO_ScavengeCodeCache   = 0x10
 393   };
 394 
 395  private:
 396   void process_roots(StrongRootsScope* scope,
 397                      ScanningOption so,
 398                      OopClosure* strong_roots,
 399                      OopClosure* weak_roots,
 400                      CLDClosure* strong_cld_closure,
 401                      CLDClosure* weak_cld_closure,
 402                      CodeBlobToOopClosure* code_roots);
 403 
 404  public:
 405   static const bool StrongAndWeakRoots = false;
 406   static const bool StrongRootsOnly    = true;


 407 
 408   void gen_process_roots(StrongRootsScope* scope,
 409                          GenerationType type,
 410                          bool young_gen_as_roots,
 411                          ScanningOption so,
 412                          bool only_strong_roots,
 413                          OopsInGenClosure* not_older_gens,
 414                          OopsInGenClosure* older_gens,
 415                          CLDClosure* cld_closure);
 416 
 417   // Apply "root_closure" to all the weak roots of the system.
 418   // These include JNI weak roots, string table,
 419   // and referents of reachable weak refs.
 420   void gen_process_weak_roots(OopClosure* root_closure);
 421 
 422   // Set the saved marks of generations, if that makes sense.
 423   // In particular, if any generation might iterate over the oops
 424   // in other generations, it should call this method.
 425   void save_marks();
 426 
 427   // Apply "cur->do_oop" or "older->do_oop" to all the oops in objects
 428   // allocated since the last call to save_marks in generations at or above
 429   // "level".  The "cur" closure is
 430   // applied to references in the generation at "level", and the "older"
 431   // closure to older generations.
 432 #define GCH_SINCE_SAVE_MARKS_ITERATE_DECL(OopClosureType, nv_suffix)    \
 433   void oop_since_save_marks_iterate(GenerationType start_gen,           \
 434                                     OopClosureType* cur,                \




 385   // excess storage retention.)
 386   // The "so" argument determines which of the roots
 387   // the closure is applied to:
 388   // "SO_None" does none;
 389   enum ScanningOption {
 390     SO_None                =  0x0,
 391     SO_AllCodeCache        =  0x8,
 392     SO_ScavengeCodeCache   = 0x10
 393   };
 394 
 395  private:
 396   void process_roots(StrongRootsScope* scope,
 397                      ScanningOption so,
 398                      OopClosure* strong_roots,
 399                      OopClosure* weak_roots,
 400                      CLDClosure* strong_cld_closure,
 401                      CLDClosure* weak_cld_closure,
 402                      CodeBlobToOopClosure* code_roots);
 403 
 404  public:
 405   void young_process_roots(StrongRootsScope* scope,
 406                            OopsInGenClosure* root_closure,
 407                            OopsInGenClosure* old_gen_closure,
 408                            CLDClosure* cld_closure);
 409 
 410   void old_process_roots(StrongRootsScope* scope,

 411                          bool young_gen_as_roots,
 412                          ScanningOption so,
 413                          bool only_strong_roots,
 414                          OopsInGenClosure* root_closure,

 415                          CLDClosure* cld_closure);
 416 
 417   // Apply "root_closure" to all the weak roots of the system.
 418   // These include JNI weak roots, string table,
 419   // and referents of reachable weak refs.
 420   void gen_process_weak_roots(OopClosure* root_closure);
 421 
 422   // Set the saved marks of generations, if that makes sense.
 423   // In particular, if any generation might iterate over the oops
 424   // in other generations, it should call this method.
 425   void save_marks();
 426 
 427   // Apply "cur->do_oop" or "older->do_oop" to all the oops in objects
 428   // allocated since the last call to save_marks in generations at or above
 429   // "level".  The "cur" closure is
 430   // applied to references in the generation at "level", and the "older"
 431   // closure to older generations.
 432 #define GCH_SINCE_SAVE_MARKS_ITERATE_DECL(OopClosureType, nv_suffix)    \
 433   void oop_since_save_marks_iterate(GenerationType start_gen,           \
 434                                     OopClosureType* cur,                \


< prev index next >