505 bool* gc_succeeded);
506
507 protected:
508 // Attempting to expand the heap sufficiently
509 // to support an allocation of the given "word_size". If
510 // successful, perform the allocation and return the address of the
511 // allocated block, or else "NULL".
512 HeapWord* expand_and_allocate(size_t word_size, AllocationContext_t context);
513
514 // Preserve any referents discovered by concurrent marking that have not yet been
515 // copied by the STW pause.
516 void preserve_cm_referents(G1ParScanThreadStateSet* per_thread_states);
517 // Process any reference objects discovered during
518 // an incremental evacuation pause.
519 void process_discovered_references(G1ParScanThreadStateSet* per_thread_states);
520
521 // Enqueue any remaining discovered references
522 // after processing.
523 void enqueue_discovered_references(G1ParScanThreadStateSet* per_thread_states);
524
525 public:
526 WorkGang* workers() const { return _workers; }
527
528 G1Allocator* allocator() {
529 return _allocator;
530 }
531
532 G1HeapVerifier* verifier() {
533 return _verifier;
534 }
535
536 G1MonitoringSupport* g1mm() {
537 assert(_g1mm != NULL, "should have been initialized");
538 return _g1mm;
539 }
540
541 // Expand the garbage-first heap by at least the given size (in bytes!).
542 // Returns true if the heap was expanded by the requested amount;
543 // false otherwise.
544 // (Rounds up to a HeapRegion boundary.)
|
505 bool* gc_succeeded);
506
507 protected:
508 // Attempting to expand the heap sufficiently
509 // to support an allocation of the given "word_size". If
510 // successful, perform the allocation and return the address of the
511 // allocated block, or else "NULL".
512 HeapWord* expand_and_allocate(size_t word_size, AllocationContext_t context);
513
514 // Preserve any referents discovered by concurrent marking that have not yet been
515 // copied by the STW pause.
516 void preserve_cm_referents(G1ParScanThreadStateSet* per_thread_states);
517 // Process any reference objects discovered during
518 // an incremental evacuation pause.
519 void process_discovered_references(G1ParScanThreadStateSet* per_thread_states);
520
521 // Enqueue any remaining discovered references
522 // after processing.
523 void enqueue_discovered_references(G1ParScanThreadStateSet* per_thread_states);
524
525 // Merges the information gathered on a per-thread basis for all worker threads
526 // during GC into global variables.
527 void merge_per_thread_state_info(G1ParScanThreadStateSet* per_thread_states);
528 public:
529 WorkGang* workers() const { return _workers; }
530
531 G1Allocator* allocator() {
532 return _allocator;
533 }
534
535 G1HeapVerifier* verifier() {
536 return _verifier;
537 }
538
539 G1MonitoringSupport* g1mm() {
540 assert(_g1mm != NULL, "should have been initialized");
541 return _g1mm;
542 }
543
544 // Expand the garbage-first heap by at least the given size (in bytes!).
545 // Returns true if the heap was expanded by the requested amount;
546 // false otherwise.
547 // (Rounds up to a HeapRegion boundary.)
|