comparison src/share/vm/memory/genMarkSweep.cpp @ 12033:bd902affe102

8023021: Unnecessary clearing of the card table introduced by the fix for JDK-8023013 Reviewed-by: stefank, ehelin
author brutisso
date Thu, 15 Aug 2013 10:05:50 +0200
parents 330dfb0476f4
children 870aedf4ba4f 0982ec23da03
comparison
equal deleted inserted replaced
12032:5d9995d16b26 12033:bd902affe102
119 for (int i = 0; all_empty && i < level; i++) { 119 for (int i = 0; all_empty && i < level; i++) {
120 Generation* g = gch->get_gen(i); 120 Generation* g = gch->get_gen(i);
121 all_empty = all_empty && gch->get_gen(i)->used() == 0; 121 all_empty = all_empty && gch->get_gen(i)->used() == 0;
122 } 122 }
123 GenRemSet* rs = gch->rem_set(); 123 GenRemSet* rs = gch->rem_set();
124 Generation* old_gen = gch->get_gen(level);
124 // Clear/invalidate below make use of the "prev_used_regions" saved earlier. 125 // Clear/invalidate below make use of the "prev_used_regions" saved earlier.
125 if (all_empty) { 126 if (all_empty) {
126 // We've evacuated all generations below us. 127 // We've evacuated all generations below us.
127 Generation* g = gch->get_gen(level); 128 rs->clear_into_younger(old_gen);
128 rs->clear_into_younger(g);
129 } else { 129 } else {
130 // Invalidate the cards corresponding to the currently used 130 // Invalidate the cards corresponding to the currently used
131 // region and clear those corresponding to the evacuated region 131 // region and clear those corresponding to the evacuated region.
132 // of all generations just collected. 132 rs->invalidate_or_clear(old_gen);
133 rs->invalidate_or_clear(gch->get_gen(1));
134 rs->invalidate_or_clear(gch->get_gen(0));
135 } 133 }
136 134
137 Threads::gc_epilogue(); 135 Threads::gc_epilogue();
138 CodeCache::gc_epilogue(); 136 CodeCache::gc_epilogue();
139 JvmtiExport::gc_epilogue(); 137 JvmtiExport::gc_epilogue();