src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp

changeset 5784
190899198332
parent 5701
40136aa2cdb1
child 5820
798522662fcd
equal deleted inserted replaced
5783:c1fbf21c7397 5784:190899198332
701 bool in_cset_fast_test(oop obj) { 701 bool in_cset_fast_test(oop obj) {
702 assert(_in_cset_fast_test != NULL, "sanity"); 702 assert(_in_cset_fast_test != NULL, "sanity");
703 if (_g1_committed.contains((HeapWord*) obj)) { 703 if (_g1_committed.contains((HeapWord*) obj)) {
704 // no need to subtract the bottom of the heap from obj, 704 // no need to subtract the bottom of the heap from obj,
705 // _in_cset_fast_test is biased 705 // _in_cset_fast_test is biased
706 uintx index = (uintx) obj >> HeapRegion::LogOfHRGrainBytes; 706 uintx index = cast_from_oop<uintx>(obj) >> HeapRegion::LogOfHRGrainBytes;
707 bool ret = _in_cset_fast_test[index]; 707 bool ret = _in_cset_fast_test[index];
708 // let's make sure the result is consistent with what the slower 708 // let's make sure the result is consistent with what the slower
709 // test returns 709 // test returns
710 assert( ret || !obj_in_cs(obj), "sanity"); 710 assert( ret || !obj_in_cs(obj), "sanity");
711 assert(!ret || obj_in_cs(obj), "sanity"); 711 assert(!ret || obj_in_cs(obj), "sanity");

mercurial