< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahAsserts.cpp

Print this page
rev 51547 : Refactor to group marking bitmap and TAMS structure in one class ShenandoahMarkingContext
rev 51548 : [mq]: refactor-marking-context.01

*** 27,36 **** --- 27,37 ---- #include "gc/shenandoah/shenandoahConnectionMatrix.hpp" #include "gc/shenandoah/shenandoahAsserts.hpp" #include "gc/shenandoah/shenandoahHeap.hpp" #include "gc/shenandoah/shenandoahHeap.inline.hpp" #include "gc/shenandoah/shenandoahHeapRegionSet.inline.hpp" + #include "gc/shenandoah/shenandoahMarkingContext.inline.hpp" #include "gc/shenandoah/shenandoahTraversalGC.hpp" #include "memory/resourceArea.hpp" void print_raw_memory(ShenandoahMessageBuffer &msg, void* loc) { // Be extra safe. Only access data that is guaranteed to be safe:
*** 59,73 **** ResourceMark rm; stringStream ss; r->print_on(&ss); msg.append(" " PTR_FORMAT " - klass " PTR_FORMAT " %s\n", p2i(obj), p2i(obj->klass()), obj->klass()->external_name()); ! msg.append(" %3s allocated after complete mark start\n", heap->allocated_after_complete_mark_start((HeapWord *) obj) ? "" : "not"); ! msg.append(" %3s allocated after next mark start\n", heap->allocated_after_next_mark_start((HeapWord *) obj) ? "" : "not"); ! msg.append(" %3s marked complete\n", heap->is_marked_complete(obj) ? "" : "not"); ! msg.append(" %3s marked next\n", heap->is_marked_next(obj) ? "" : "not"); msg.append(" %3s in collection set\n", heap->in_collection_set(obj) ? "" : "not"); if (heap->traversal_gc() != NULL) { msg.append(" %3s in root set\n", heap->traversal_gc()->root_regions()->is_in((HeapWord*) obj) ? "" : "not"); msg.append(" %3s in traversal set\n", heap->traversal_gc()->traversal_set()->is_in((HeapWord*) obj) ? "" : "not"); } --- 60,77 ---- ResourceMark rm; stringStream ss; r->print_on(&ss); + ShenandoahMarkingContext* const next_ctx = heap->next_marking_context(); + ShenandoahMarkingContext* const compl_ctx = heap->next_marking_context(); + msg.append(" " PTR_FORMAT " - klass " PTR_FORMAT " %s\n", p2i(obj), p2i(obj->klass()), obj->klass()->external_name()); ! msg.append(" %3s allocated after complete mark start\n", compl_ctx->allocated_after_mark_start((HeapWord *) obj) ? "" : "not"); ! msg.append(" %3s allocated after next mark start\n", next_ctx->allocated_after_mark_start((HeapWord *) obj) ? "" : "not"); ! msg.append(" %3s marked complete\n", compl_ctx->is_marked(obj) ? "" : "not"); ! msg.append(" %3s marked next\n", next_ctx->is_marked(obj) ? "" : "not"); msg.append(" %3s in collection set\n", heap->in_collection_set(obj) ? "" : "not"); if (heap->traversal_gc() != NULL) { msg.append(" %3s in root set\n", heap->traversal_gc()->root_regions()->is_in((HeapWord*) obj) ? "" : "not"); msg.append(" %3s in traversal set\n", heap->traversal_gc()->traversal_set()->is_in((HeapWord*) obj) ? "" : "not"); }
*** 318,339 **** void ShenandoahAsserts::assert_marked_complete(void* interior_loc, oop obj, const char* file, int line) { assert_correct(interior_loc, obj, file, line); ShenandoahHeap* heap = ShenandoahHeap::heap_no_check(); ! if (!heap->is_marked_complete(obj)) { print_failure(_safe_all, obj, interior_loc, NULL, "Shenandoah assert_marked_complete failed", "Object should be marked (complete)", file, line); } } void ShenandoahAsserts::assert_marked_next(void* interior_loc, oop obj, const char* file, int line) { assert_correct(interior_loc, obj, file, line); ShenandoahHeap* heap = ShenandoahHeap::heap_no_check(); ! if (!heap->is_marked_next(obj)) { print_failure(_safe_all, obj, interior_loc, NULL, "Shenandoah assert_marked_next failed", "Object should be marked (next)", file, line); } } --- 322,343 ---- void ShenandoahAsserts::assert_marked_complete(void* interior_loc, oop obj, const char* file, int line) { assert_correct(interior_loc, obj, file, line); ShenandoahHeap* heap = ShenandoahHeap::heap_no_check(); ! if (!heap->complete_marking_context()->is_marked(obj)) { print_failure(_safe_all, obj, interior_loc, NULL, "Shenandoah assert_marked_complete failed", "Object should be marked (complete)", file, line); } } void ShenandoahAsserts::assert_marked_next(void* interior_loc, oop obj, const char* file, int line) { assert_correct(interior_loc, obj, file, line); ShenandoahHeap* heap = ShenandoahHeap::heap_no_check(); ! if (!heap->next_marking_context()->is_marked(obj)) { print_failure(_safe_all, obj, interior_loc, NULL, "Shenandoah assert_marked_next failed", "Object should be marked (next)", file, line); } }
< prev index next >