347 virtual void do_generation(Generation* gen) = 0; 348 }; 349 350 // Apply "cl.do_generation" to all generations in the heap 351 // If "old_to_young" determines the order. 352 void generation_iterate(GenClosure* cl, bool old_to_young); 353 354 // Return "true" if all generations have reached the 355 // maximal committed limit that they can reach, without a garbage 356 // collection. 357 virtual bool is_maximal_no_gc() const; 358 359 // This function returns the "GenRemSet" object that allows us to scan 360 // generations in a fully generational heap. 361 GenRemSet* rem_set() { return _rem_set; } 362 363 // Convenience function to be used in situations where the heap type can be 364 // asserted to be this type. 365 static GenCollectedHeap* heap(); 366 367 void set_par_threads(uint t); 368 369 // Invoke the "do_oop" method of one of the closures "not_older_gens" 370 // or "older_gens" on root locations for the generation at 371 // "level". (The "older_gens" closure is used for scanning references 372 // from older generations; "not_older_gens" is used everywhere else.) 373 // If "younger_gens_as_roots" is false, younger generations are 374 // not scanned as roots; in this case, the caller must be arranging to 375 // scan the younger generations itself. (For example, a generation might 376 // explicitly mark reachable objects in younger generations, to avoid 377 // excess storage retention.) 378 // The "so" argument determines which of the roots 379 // the closure is applied to: 380 // "SO_None" does none; 381 enum ScanningOption { 382 SO_None = 0x0, 383 SO_AllCodeCache = 0x8, 384 SO_ScavengeCodeCache = 0x10 385 }; 386 387 private: 388 void process_roots(StrongRootsScope* scope, | 347 virtual void do_generation(Generation* gen) = 0; 348 }; 349 350 // Apply "cl.do_generation" to all generations in the heap 351 // If "old_to_young" determines the order. 352 void generation_iterate(GenClosure* cl, bool old_to_young); 353 354 // Return "true" if all generations have reached the 355 // maximal committed limit that they can reach, without a garbage 356 // collection. 357 virtual bool is_maximal_no_gc() const; 358 359 // This function returns the "GenRemSet" object that allows us to scan 360 // generations in a fully generational heap. 361 GenRemSet* rem_set() { return _rem_set; } 362 363 // Convenience function to be used in situations where the heap type can be 364 // asserted to be this type. 365 static GenCollectedHeap* heap(); 366 367 // Invoke the "do_oop" method of one of the closures "not_older_gens" 368 // or "older_gens" on root locations for the generation at 369 // "level". (The "older_gens" closure is used for scanning references 370 // from older generations; "not_older_gens" is used everywhere else.) 371 // If "younger_gens_as_roots" is false, younger generations are 372 // not scanned as roots; in this case, the caller must be arranging to 373 // scan the younger generations itself. (For example, a generation might 374 // explicitly mark reachable objects in younger generations, to avoid 375 // excess storage retention.) 376 // The "so" argument determines which of the roots 377 // the closure is applied to: 378 // "SO_None" does none; 379 enum ScanningOption { 380 SO_None = 0x0, 381 SO_AllCodeCache = 0x8, 382 SO_ScavengeCodeCache = 0x10 383 }; 384 385 private: 386 void process_roots(StrongRootsScope* scope, |