RFR (XS): JDK-8076614: Add comment to ClearNoncleanCardWrapper::do_MemRegion()

Bengt Rutisson bengt.rutisson at oracle.com
Thu Apr 2 20:53:17 UTC 2015


Hi all,

Can I have a couple of reviews to add this comment to cardTableRS.cpp?

https://bugs.openjdk.java.net/browse/JDK-8076614

This was discussed during the review of "JDK-8076241: Remove unused 
methods mod_card_iterate()    and non_clean_card_iterate_serial()", see:

http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2015-April/012661.html

For JDK-8076241 I removed this comment because it didn't make sense 
anymore at the place where it used to be. We now agree that a better 
place for
  it is close to the ClearNoncleanCardWrapper::do_MemRegion() method 
because that still does backwards iteration of the card table.

Since I am only adding a comment I think a diff is easier to review than 
a webrev:

diff --git a/src/share/vm/memory/cardTableRS.cpp 
b/src/share/vm/memory/cardTableRS.cpp
--- a/src/share/vm/memory/cardTableRS.cpp
+++ b/src/share/vm/memory/cardTableRS.cpp
@@ -176,7 +176,10 @@
bool ClearNoncleanCardWrapper::is_word_aligned(jbyte* entry) {
  return (((intptr_t)entry) & (BytesPerWord-1)) == 0;
}
-
+// The regions are visited in *decreasing* address order.
+// This order aids with imprecise card marking, where a dirty
+// card may cause scanning, and summarization marking, of objects
+// that extend onto subsequent cards.
void ClearNoncleanCardWrapper::do_MemRegion(MemRegion mr) {
  assert(mr.word_size() > 0, "Error");
  assert(_ct->is_aligned(mr.start()), "mr.start() should be card aligned”);


Thanks,
Bengt


More information about the hotspot-gc-dev mailing list