hotspot/src/share/vm/gc/g1/g1CollectedHeap.hpp
changeset 32736 755024a84282
parent 32735 c6063d028c3c
child 32737 f02118695c2f
equal deleted inserted replaced
32735:c6063d028c3c 32736:755024a84282
    54 class HeapRegion;
    54 class HeapRegion;
    55 class HRRSCleanupTask;
    55 class HRRSCleanupTask;
    56 class GenerationSpec;
    56 class GenerationSpec;
    57 class OopsInHeapRegionClosure;
    57 class OopsInHeapRegionClosure;
    58 class G1ParScanThreadState;
    58 class G1ParScanThreadState;
       
    59 class G1ParScanThreadStateSet;
    59 class G1KlassScanClosure;
    60 class G1KlassScanClosure;
    60 class G1ParScanThreadState;
    61 class G1ParScanThreadState;
    61 class ObjectClosure;
    62 class ObjectClosure;
    62 class SpaceClosure;
    63 class SpaceClosure;
    63 class CompactibleSpaceClosure;
    64 class CompactibleSpaceClosure;
   190   friend class MutatorAllocRegion;
   191   friend class MutatorAllocRegion;
   191   friend class G1GCAllocRegion;
   192   friend class G1GCAllocRegion;
   192 
   193 
   193   // Closures used in implementation.
   194   // Closures used in implementation.
   194   friend class G1ParScanThreadState;
   195   friend class G1ParScanThreadState;
       
   196   friend class G1ParScanThreadStateSet;
   195   friend class G1ParTask;
   197   friend class G1ParTask;
   196   friend class G1PLABAllocator;
   198   friend class G1PLABAllocator;
   197   friend class G1PrepareCompactClosure;
   199   friend class G1PrepareCompactClosure;
   198 
   200 
   199   // Other related classes.
   201   // Other related classes.
   582   // allocated block, or else "NULL".
   584   // allocated block, or else "NULL".
   583   HeapWord* expand_and_allocate(size_t word_size, AllocationContext_t context);
   585   HeapWord* expand_and_allocate(size_t word_size, AllocationContext_t context);
   584 
   586 
   585   // Process any reference objects discovered during
   587   // Process any reference objects discovered during
   586   // an incremental evacuation pause.
   588   // an incremental evacuation pause.
   587   void process_discovered_references(G1ParScanThreadState** per_thread_states);
   589   void process_discovered_references(G1ParScanThreadStateSet* per_thread_states);
   588 
   590 
   589   // Enqueue any remaining discovered references
   591   // Enqueue any remaining discovered references
   590   // after processing.
   592   // after processing.
   591   void enqueue_discovered_references(G1ParScanThreadState** per_thread_states);
   593   void enqueue_discovered_references(G1ParScanThreadStateSet* per_thread_states);
   592 
   594 
   593 public:
   595 public:
   594   WorkGang* workers() const { return _workers; }
   596   WorkGang* workers() const { return _workers; }
   595 
   597 
   596   G1Allocator* allocator() {
   598   G1Allocator* allocator() {
   681   G1HRPrinter* hr_printer() { return &_hr_printer; }
   683   G1HRPrinter* hr_printer() { return &_hr_printer; }
   682 
   684 
   683   // Allocates a new heap region instance.
   685   // Allocates a new heap region instance.
   684   HeapRegion* new_heap_region(uint hrs_index, MemRegion mr);
   686   HeapRegion* new_heap_region(uint hrs_index, MemRegion mr);
   685 
   687 
   686   // Allocates a new per thread par scan state for the given thread id.
       
   687   G1ParScanThreadState* new_par_scan_state(uint worker_id);
       
   688 
       
   689   // Allocate the highest free region in the reserved heap. This will commit
   688   // Allocate the highest free region in the reserved heap. This will commit
   690   // regions as necessary.
   689   // regions as necessary.
   691   HeapRegion* alloc_highest_free_region();
   690   HeapRegion* alloc_highest_free_region();
   692 
   691 
   693   // Frees a non-humongous region by initializing its contents and
   692   // Frees a non-humongous region by initializing its contents and
   797   // thread. It returns false if it is unable to do the collection due
   796   // thread. It returns false if it is unable to do the collection due
   798   // to the GC locker being active, true otherwise
   797   // to the GC locker being active, true otherwise
   799   bool do_collection_pause_at_safepoint(double target_pause_time_ms);
   798   bool do_collection_pause_at_safepoint(double target_pause_time_ms);
   800 
   799 
   801   // Actually do the work of evacuating the collection set.
   800   // Actually do the work of evacuating the collection set.
   802   void evacuate_collection_set(EvacuationInfo& evacuation_info);
   801   void evacuate_collection_set(EvacuationInfo& evacuation_info, G1ParScanThreadStateSet* per_thread_states);
   803 
   802 
   804   // Print the header for the per-thread termination statistics.
   803   // Print the header for the per-thread termination statistics.
   805   static void print_termination_stats_hdr(outputStream* const st);
   804   static void print_termination_stats_hdr(outputStream* const st);
   806   // Print actual per-thread termination statistics.
   805   // Print actual per-thread termination statistics.
   807   void print_termination_stats(outputStream* const st,
   806   void print_termination_stats(outputStream* const st,