# HG changeset patch # User kbarrett # Date 1428945164 14400 # Mon Apr 13 13:12:44 2015 -0400 # Node ID b2e9e2f3bc9effeb452708485b009411064a7e36 # Parent 94121a1786994f25ffff99bb777202d1e1e9c17d [mq]: inc1 diff --git a/src/share/vm/gc_implementation/g1/satbQueue.cpp b/src/share/vm/gc_implementation/g1/satbQueue.cpp --- a/src/share/vm/gc_implementation/g1/satbQueue.cpp +++ b/src/share/vm/gc_implementation/g1/satbQueue.cpp @@ -73,16 +73,17 @@ // processing must be somewhat circumspect and not assume entries // in an unfiltered buffer refer to valid objects. -inline bool requires_marking(const HeapWord* entry, G1CollectedHeap* heap) { +inline bool requires_marking(const void* entry, G1CollectedHeap* heap) { // Includes rejection of NULL pointers. assert(heap->is_in_reserved(entry), err_msg("Non-heap pointer in SATB buffer: " PTR_FORMAT, p2i(entry))); HeapRegion* region = heap->heap_region_containing_raw(entry); assert(region != NULL, err_msg("No region for " PTR_FORMAT, p2i(entry))); - if (entry >= region->next_top_at_mark_start()) return false; + if (entry >= region->next_top_at_mark_start()) { + return false; + } - // Can obj really have it's mark word set? It's not in young gen... assert(((oop)entry)->is_oop(true /* ignore mark word */), err_msg("Invalid oop in SATB buffer: " PTR_FORMAT, p2i(entry))); @@ -114,8 +115,8 @@ assert(i > 0, "we should have at least one more entry to process"); i -= oopSize; debug_only(entries += 1;) - HeapWord** p = (HeapWord**) &buf[byte_index_to_index((int) i)]; - HeapWord* entry = *p; + void** p = &buf[byte_index_to_index((int) i)]; + void* entry = *p; // NULL the entry so that unused parts of the buffer contain NULLs // at the end. If we are going to retain it we will copy it to its // final place. If we have retained all entries we have visited so @@ -127,7 +128,7 @@ new_index -= oopSize; assert(new_index >= i, "new_index should never be below i, as we always compact 'up'"); - HeapWord** new_p = (HeapWord**) &buf[byte_index_to_index((int) new_index)]; + void** new_p = &buf[byte_index_to_index((int) new_index)]; assert(new_p >= p, "the destination location should never be below " "the source as we always compact 'up'"); assert(*new_p == NULL,