8173229: Wrong assert whether all remembered set entries have been iterated over in presence of coarsenings
Summary: Remove asserts as they are almost useless.
Reviewed-by: mgerdin, ehelin
--- a/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp Thu Jan 26 10:17:06 2017 -0800
+++ b/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp Fri Jan 27 13:12:53 2017 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, 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
@@ -711,29 +711,6 @@
guarantee(G1RSetSparseRegionEntries > 0 && G1RSetRegionEntries > 0 , "Sanity");
}
-#ifndef PRODUCT
-void HeapRegionRemSet::print() {
- HeapRegionRemSetIterator iter(this);
- size_t card_index;
- while (iter.has_next(card_index)) {
- HeapWord* card_start = _bot->address_for_index(card_index);
- tty->print_cr(" Card " PTR_FORMAT, p2i(card_start));
- }
- if (iter.n_yielded() != occupied()) {
- tty->print_cr("Yielded disagrees with occupied:");
- tty->print_cr(" " SIZE_FORMAT_W(6) " yielded (" SIZE_FORMAT_W(6)
- " coarse, " SIZE_FORMAT_W(6) " fine).",
- iter.n_yielded(),
- iter.n_yielded_coarse(), iter.n_yielded_fine());
- tty->print_cr(" " SIZE_FORMAT_W(6) " occ (" SIZE_FORMAT_W(6)
- " coarse, " SIZE_FORMAT_W(6) " fine).",
- occupied(), occ_coarse(), occ_fine());
- }
- guarantee(iter.n_yielded() == occupied(),
- "We should have yielded all the represented cards.");
-}
-#endif
-
void HeapRegionRemSet::cleanup() {
SparsePRT::cleanup_all();
}
@@ -917,10 +894,6 @@
// Otherwise...
break;
}
- assert(ParallelGCThreads > 1 ||
- n_yielded() == _hrrs->occupied(),
- "Should have yielded all the cards in the rem set "
- "(in the non-par case).");
return false;
}
--- a/hotspot/src/share/vm/gc/g1/heapRegionRemSet.hpp Thu Jan 26 10:17:06 2017 -0800
+++ b/hotspot/src/share/vm/gc/g1/heapRegionRemSet.hpp Fri Jan 27 13:12:53 2017 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, 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
@@ -290,8 +290,6 @@
// consumed by the strong code roots.
size_t strong_code_roots_mem_size();
- void print() PRODUCT_RETURN;
-
// Called during a stop-world phase to perform any deferred cleanups.
static void cleanup();