< prev index next >

src/hotspot/share/gc/g1/g1CollectedHeap.cpp

Print this page

        

@@ -642,11 +642,11 @@
         curr_region->set_open_archive();
       } else {
         curr_region->set_closed_archive();
       }
       _hr_printer.alloc(curr_region);
-      _archive_set.add(curr_region);
+      archive_set_add(curr_region);
       HeapWord* top;
       HeapRegion* next_region;
       if (curr_region != last_region) {
         top = curr_region->end();
         next_region = _hrm.next_region_in_heap(curr_region);

@@ -1604,11 +1604,10 @@
 
 jint G1CollectedHeap::initialize() {
   os::enable_vtime();
 
   // Necessary to satisfy locking discipline assertions.
-
   MutexLocker x(Heap_lock);
 
   // While there are no constraints in the GC code that HeapWordSize
   // be any particular value, there are multiple other areas in the
   // system which believe this to be true (e.g. oop->object_size in some

@@ -1831,10 +1830,13 @@
 size_t G1CollectedHeap::conservative_max_heap_alignment() {
   return HeapRegion::max_region_size();
 }
 
 void G1CollectedHeap::post_initialize() {
+  // Necessary to satisfy locking discipline assertions.
+  MutexLockerEx x(Heap_lock);
+
   CollectedHeap::post_initialize();
   ref_processing_init();
 }
 
 void G1CollectedHeap::ref_processing_init() {

@@ -2897,13 +2899,11 @@
                                                                   workers()->active_workers(),
                                                                   Threads::number_of_non_daemon_threads());
     active_workers = workers()->update_active_workers(active_workers);
     log_info(gc,task)("Using %u workers of %u for evacuation", active_workers, workers()->total_workers());
 
-    G1MonitoringScope ms(g1mm(),
-                         false /* full_gc */,
-                         collector_state()->yc_type() == Mixed /* all_memory_pools_affected */);
+    G1MonitoringScope ms(g1mm(), false /* full_gc */, collector_state()->yc_type() == Mixed /* mixed_gc */);
 
     G1HeapTransition heap_transition(this);
     size_t heap_used_bytes_before_gc = used();
 
     // Don't dynamically change the number of GC threads this early.  A value of
< prev index next >