6700789: G1: Enable use of compressed oops with G1 heaps

Modifications to G1 so as to allow the use of compressed oops.

Reviewed-by: apetrusenko, coleenp, jmasa, kvn, never, phh, tonyp
This commit is contained in:
Y. Srinivas Ramakrishna 2009-07-14 15:40:39 -07:00
parent 50d7db1805
commit 075c1335cb
58 changed files with 1233 additions and 1175 deletions

View file

@ -25,12 +25,27 @@
# include "incls/_precompiled.incl"
# include "incls/_barrierSet.cpp.incl"
// count is in HeapWord's
// count is number of array elements being written
void BarrierSet::static_write_ref_array_pre(HeapWord* start, size_t count) {
Universe::heap()->barrier_set()->write_ref_array_pre(MemRegion(start, start + count));
assert(count <= (size_t)max_intx, "count too large");
#if 0
warning("Pre: \t" INTPTR_FORMAT "[" SIZE_FORMAT "]\t",
start, count);
#endif
if (UseCompressedOops) {
Universe::heap()->barrier_set()->write_ref_array_pre((narrowOop*)start, (int)count);
} else {
Universe::heap()->barrier_set()->write_ref_array_pre( (oop*)start, (int)count);
}
}
// count is in HeapWord's
// count is number of array elements being written
void BarrierSet::static_write_ref_array_post(HeapWord* start, size_t count) {
Universe::heap()->barrier_set()->write_ref_array_work(MemRegion(start, start + count));
assert(count <= (size_t)max_intx, "count too large");
HeapWord* end = start + objArrayOopDesc::array_size((int)count);
#if 0
warning("Post:\t" INTPTR_FORMAT "[" SIZE_FORMAT "] : [" INTPTR_FORMAT","INTPTR_FORMAT")\t",
start, count, start, end);
#endif
Universe::heap()->barrier_set()->write_ref_array_work(MemRegion(start, end));
}