< prev index next >

src/hotspot/share/gc/parallel/psCompactionManager.cpp

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -22,10 +22,11 @@
  *
  */
 
 #include "precompiled.hpp"
 #include "classfile/systemDictionary.hpp"
+#include "gc/parallel/gcTaskManager.hpp"
 #include "gc/parallel/objectStartArray.hpp"
 #include "gc/parallel/parMarkBitMap.inline.hpp"
 #include "gc/parallel/parallelScavengeHeap.hpp"
 #include "gc/parallel/psCompactionManager.inline.hpp"
 #include "gc/parallel/psOldGen.hpp"

@@ -65,16 +66,16 @@
 
   reset_bitmap_query_cache();
 }
 
 void ParCompactionManager::initialize(ParMarkBitMap* mbm) {
-  assert(ParallelScavengeHeap::heap() != NULL,
+  assert(PSParallelCompact::gc_task_manager() != NULL,
     "Needed for initialization");
 
   _mark_bitmap = mbm;
 
-  uint parallel_gc_threads = ParallelScavengeHeap::heap()->workers().total_workers();
+  uint parallel_gc_threads = PSParallelCompact::gc_task_manager()->workers();
 
   assert(_manager_array == NULL, "Attempt to initialize twice");
   _manager_array = NEW_C_HEAP_ARRAY(ParCompactionManager*, parallel_gc_threads+1, mtGC);
   guarantee(_manager_array != NULL, "Could not allocate manager_array");
 

@@ -97,16 +98,16 @@
   // The VMThread gets its own ParCompactionManager, which is not available
   // for work stealing.
   _manager_array[parallel_gc_threads] = new ParCompactionManager();
   guarantee(_manager_array[parallel_gc_threads] != NULL,
     "Could not create ParCompactionManager");
-  assert(ParallelScavengeHeap::heap()->workers().total_workers() != 0,
+  assert(PSParallelCompact::gc_task_manager()->workers() != 0,
     "Not initialized?");
 }
 
 void ParCompactionManager::reset_all_bitmap_query_caches() {
-  uint parallel_gc_threads = ParallelScavengeHeap::heap()->workers().total_workers();
+  uint parallel_gc_threads = PSParallelCompact::gc_task_manager()->workers();
   for (uint i=0; i<=parallel_gc_threads; i++) {
     _manager_array[i]->reset_bitmap_query_cache();
   }
 }
 
< prev index next >