1261 |
1261 |
1262 // We don't need barriers for initializing stores to objects |
1262 // We don't need barriers for initializing stores to objects |
1263 // in the young gen: for the SATB pre-barrier, there is no |
1263 // in the young gen: for the SATB pre-barrier, there is no |
1264 // pre-value that needs to be remembered; for the remembered-set |
1264 // pre-value that needs to be remembered; for the remembered-set |
1265 // update logging post-barrier, we don't maintain remembered set |
1265 // update logging post-barrier, we don't maintain remembered set |
1266 // information for young gen objects. Note that non-generational |
1266 // information for young gen objects. |
1267 // G1 does not have any "young" objects, should not elide |
|
1268 // the rs logging barrier and so should always answer false below. |
|
1269 // However, non-generational G1 (-XX:-G1Gen) appears to have |
|
1270 // bit-rotted so was not tested below. |
|
1271 virtual bool can_elide_initializing_store_barrier(oop new_obj) { |
1267 virtual bool can_elide_initializing_store_barrier(oop new_obj) { |
1272 // Re 6920090, 6920109 above. |
1268 // Re 6920090, 6920109 above. |
1273 assert(ReduceInitialCardMarksForG1, "Else cannot be here"); |
1269 assert(ReduceInitialCardMarksForG1, "Else cannot be here"); |
1274 assert(G1Gen || !is_in_young(new_obj), |
|
1275 "Non-generational G1 should never return true below"); |
|
1276 return is_in_young(new_obj); |
1270 return is_in_young(new_obj); |
1277 } |
1271 } |
1278 |
1272 |
1279 // Can a compiler elide a store barrier when it writes |
1273 // Can a compiler elide a store barrier when it writes |
1280 // a permanent oop into the heap? Applies when the compiler |
1274 // a permanent oop into the heap? Applies when the compiler |
1387 // functions. |
1381 // functions. |
1388 // This performs a concurrent marking of the live objects in a |
1382 // This performs a concurrent marking of the live objects in a |
1389 // bitmap off to the side. |
1383 // bitmap off to the side. |
1390 void doConcurrentMark(); |
1384 void doConcurrentMark(); |
1391 |
1385 |
1392 // Do a full concurrent marking, synchronously. |
|
1393 void do_sync_mark(); |
|
1394 |
|
1395 bool isMarkedPrev(oop obj) const; |
1386 bool isMarkedPrev(oop obj) const; |
1396 bool isMarkedNext(oop obj) const; |
1387 bool isMarkedNext(oop obj) const; |
1397 |
1388 |
1398 // vo == UsePrevMarking -> use "prev" marking information, |
1389 // vo == UsePrevMarking -> use "prev" marking information, |
1399 // vo == UseNextMarking -> use "next" marking information, |
1390 // vo == UseNextMarking -> use "next" marking information, |