8129961: SIGSEGV when copying to survivor space
authorecaspole
Mon, 13 Jul 2015 11:49:23 -0400
changeset 31780 613fc3da8884
parent 31779 0d07ffa7dc9b
child 31781 6bc2497120a9
child 31783 dbc24ca25ee4
8129961: SIGSEGV when copying to survivor space Summary: Remove "include_young" parameter from GenCollectedHeap::no_allocs_since_save_marks() since all existing uses pass true to always rescan young gen. Reviewed-by: jmasa, kbarrett
hotspot/src/share/vm/gc/cms/parNewGeneration.cpp
hotspot/src/share/vm/gc/serial/defNewGeneration.cpp
hotspot/src/share/vm/gc/shared/genCollectedHeap.cpp
hotspot/src/share/vm/gc/shared/genCollectedHeap.hpp
--- a/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp	Sun Jul 12 22:54:54 2015 -0400
+++ b/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp	Mon Jul 13 11:49:23 2015 -0400
@@ -848,7 +848,7 @@
     _gch->oop_since_save_marks_iterate(GenCollectedHeap::YoungGen,
                                        _scan_cur_or_nonheap,
                                        _scan_older);
-  } while (!_gch->no_allocs_since_save_marks(true /* include_young */));
+  } while (!_gch->no_allocs_since_save_marks());
 }
 
 
--- a/hotspot/src/share/vm/gc/serial/defNewGeneration.cpp	Sun Jul 12 22:54:54 2015 -0400
+++ b/hotspot/src/share/vm/gc/serial/defNewGeneration.cpp	Mon Jul 13 11:49:23 2015 -0400
@@ -96,7 +96,7 @@
 void DefNewGeneration::EvacuateFollowersClosure::do_void() {
   do {
     _gch->oop_since_save_marks_iterate(GenCollectedHeap::YoungGen, _scan_cur_or_nonheap, _scan_older);
-  } while (!_gch->no_allocs_since_save_marks(GenCollectedHeap::YoungGen));
+  } while (!_gch->no_allocs_since_save_marks());
 }
 
 DefNewGeneration::FastEvacuateFollowersClosure::
@@ -112,7 +112,7 @@
 void DefNewGeneration::FastEvacuateFollowersClosure::do_void() {
   do {
     _gch->oop_since_save_marks_iterate(GenCollectedHeap::YoungGen, _scan_cur_or_nonheap, _scan_older);
-  } while (!_gch->no_allocs_since_save_marks(GenCollectedHeap::YoungGen));
+  } while (!_gch->no_allocs_since_save_marks());
   guarantee(_gen->promo_failure_scan_is_complete(), "Failed to finish scan");
 }
 
@@ -597,7 +597,7 @@
 
   gch->rem_set()->prepare_for_younger_refs_iterate(false);
 
-  assert(gch->no_allocs_since_save_marks(GenCollectedHeap::YoungGen),
+  assert(gch->no_allocs_since_save_marks(),
          "save marks have not been newly set.");
 
   // Not very pretty.
@@ -617,7 +617,7 @@
                                                   &fsc_with_no_gc_barrier,
                                                   &fsc_with_gc_barrier);
 
-  assert(gch->no_allocs_since_save_marks(GenCollectedHeap::YoungGen),
+  assert(gch->no_allocs_since_save_marks(),
          "save marks have not been newly set.");
 
   {
--- a/hotspot/src/share/vm/gc/shared/genCollectedHeap.cpp	Sun Jul 12 22:54:54 2015 -0400
+++ b/hotspot/src/share/vm/gc/shared/genCollectedHeap.cpp	Mon Jul 13 11:49:23 2015 -0400
@@ -741,11 +741,9 @@
 
 #undef GCH_SINCE_SAVE_MARKS_ITERATE_DEFN
 
-bool GenCollectedHeap::no_allocs_since_save_marks(bool include_young) {
-  if (include_young && !_young_gen->no_allocs_since_save_marks()) {
-    return false;
-  }
-  return _old_gen->no_allocs_since_save_marks();
+bool GenCollectedHeap::no_allocs_since_save_marks() {
+  return _young_gen->no_allocs_since_save_marks() &&
+         _old_gen->no_allocs_since_save_marks();
 }
 
 bool GenCollectedHeap::supports_inline_contig_alloc() const {
--- a/hotspot/src/share/vm/gc/shared/genCollectedHeap.hpp	Sun Jul 12 22:54:54 2015 -0400
+++ b/hotspot/src/share/vm/gc/shared/genCollectedHeap.hpp	Mon Jul 13 11:49:23 2015 -0400
@@ -436,7 +436,7 @@
 
   // Returns "true" iff no allocations have occurred since the last
   // call to "save_marks".
-  bool no_allocs_since_save_marks(bool include_young);
+  bool no_allocs_since_save_marks();
 
   // Returns true if an incremental collection is likely to fail.
   // We optionally consult the young gen, if asked to do so;