Request for review: 8008079 G1: Add nextObject routine to CMBitMapRO and replace nextWord
john.cuthbertson at oracle.com
Mon Feb 25 23:06:15 UTC 2013
Looks fine except for the following nits....
Can you remove the line:
// XXX Fix these so that offsets are size_t's...
It might be safer to return:
return offsetToHeapWord(heapWordToOffset(addr + obj->size()));
or assert something like:
HeapWord* res = addr + obj->size();
assert(offsetToHeapWord(heapWordToOffset(res)) == res, "sanity");
On 2/21/2013 6:16 PM, Tao Mao wrote:
> 8008079 G1: Add nextObject routine to CMBitMapRO and replace nextWord
> When concurrent marking scans an object, the task local finger is
> updated to point to the start of the object. If the marking task is
> asked to abort, the local finger is updated to the next word where
> another could possibly start. When the marking task is restarted, we
> restart scanning the marking bitmap from the updated local finger.
> This is a safe implementation but has not been fully exploited for
> efficiency because the contents of the marking bitmap should be all
> 0's until the offset associated with the actual start of the next
> object. When the marking task is restarted, we will scan these 0's
> looking for the first set bit.
> We can avoid this redundant scanning by updating the finger to and
> re-starting the scan at the actual offset where the next object starts.
> passed gc-test-suite with stressing marking cycles
> ./run.sh /home/tamao/jdk1.8.0 --bits 64 --args -tamao -XX:+UseG1GC
> -XX:InitiatingHeapOccupancyPercent=10 -XX:+UnlockDiagnosticVMOptions
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-gc-dev