< prev index next >

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

Print this page
rev 9846 : [mq]: par-scav-patch
rev 9847 : 8146987: Improve Parallel GC Full GC by caching results of live_words_in_range()
Summary: A large part of time in the parallel scavenge collector is spent finding out the amount of live words within memory ranges to find out where to move an object to. Try to incrementally calculate this value.
Reviewed-by: tschatzl, mgerdin
Contributed-by: ray alex <sky1young@gmail.com>

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, 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.

@@ -122,10 +122,17 @@
     "Could not create ParCompactionManager");
   assert(PSParallelCompact::gc_task_manager()->workers() != 0,
     "Not initialized?");
 }
 
+void ParCompactionManager::reset_cache_for_bitmap() {
+  uint parallel_gc_threads = PSParallelCompact::gc_task_manager()->workers();
+  for (uint i=0; i<=parallel_gc_threads; i++) {
+    _manager_array[i]->set_last_query_begin(NULL);
+  }
+}
+
 int ParCompactionManager::pop_recycled_stack_index() {
   assert(_recycled_bottom <= _recycled_top, "list is empty");
   // Get the next available index
   if (_recycled_bottom < _recycled_top) {
     uint cur, next, last;
< prev index next >