< prev index next >

src/share/vm/gc_implementation/shenandoah/shenandoahHeap.inline.hpp

Print this page
rev 11467 : [mq]: JDK-8234096-test.patch


 261     // not get updated for this stale copy during this cycle, and we will crash while scanning
 262     // it the next cycle.
 263     //
 264     // For GCLAB allocations, it is enough to rollback the allocation ptr. Either the next
 265     // object will overwrite this stale copy, or the filler object on LAB retirement will
 266     // do this. For non-GCLAB allocations, we have no way to retract the allocation, and
 267     // have to explicitly overwrite the copy with the filler object. With that overwrite,
 268     // we have to keep the fwdptr initialized and pointing to our (stale) copy.
 269     if (alloc_from_gclab) {
 270       thread->gclab().rollback(size);
 271     } else {
 272       fill_with_object(copy, size);
 273       shenandoah_assert_correct(NULL, copy_val);
 274     }
 275     shenandoah_assert_correct(NULL, result);
 276     return result;
 277   }
 278 }
 279 
 280 inline bool ShenandoahHeap::requires_marking(const void* entry) const {
 281   return !_marking_context->is_marked(oop(entry));
 282 }
 283 
 284 template <class T>
 285 inline bool ShenandoahHeap::in_collection_set(T p) const {
 286   HeapWord* obj = (HeapWord*) p;
 287   assert(collection_set() != NULL, "Sanity");
 288   assert(is_in(obj), "should be in heap");
 289 
 290   return collection_set()->is_in(obj);
 291 }
 292 
 293 inline bool ShenandoahHeap::is_stable() const {
 294   return _gc_state.is_clear();
 295 }
 296 
 297 inline bool ShenandoahHeap::is_idle() const {
 298   return _gc_state.is_unset(MARKING | EVACUATION | UPDATEREFS | TRAVERSAL);
 299 }
 300 
 301 inline bool ShenandoahHeap::is_concurrent_mark_in_progress() const {




 261     // not get updated for this stale copy during this cycle, and we will crash while scanning
 262     // it the next cycle.
 263     //
 264     // For GCLAB allocations, it is enough to rollback the allocation ptr. Either the next
 265     // object will overwrite this stale copy, or the filler object on LAB retirement will
 266     // do this. For non-GCLAB allocations, we have no way to retract the allocation, and
 267     // have to explicitly overwrite the copy with the filler object. With that overwrite,
 268     // we have to keep the fwdptr initialized and pointing to our (stale) copy.
 269     if (alloc_from_gclab) {
 270       thread->gclab().rollback(size);
 271     } else {
 272       fill_with_object(copy, size);
 273       shenandoah_assert_correct(NULL, copy_val);
 274     }
 275     shenandoah_assert_correct(NULL, result);
 276     return result;
 277   }
 278 }
 279 
 280 inline bool ShenandoahHeap::requires_marking(const void* entry) const {
 281   return !ShenandoahSATBFilter || !_marking_context->is_marked(oop(entry));
 282 }
 283 
 284 template <class T>
 285 inline bool ShenandoahHeap::in_collection_set(T p) const {
 286   HeapWord* obj = (HeapWord*) p;
 287   assert(collection_set() != NULL, "Sanity");
 288   assert(is_in(obj), "should be in heap");
 289 
 290   return collection_set()->is_in(obj);
 291 }
 292 
 293 inline bool ShenandoahHeap::is_stable() const {
 294   return _gc_state.is_clear();
 295 }
 296 
 297 inline bool ShenandoahHeap::is_idle() const {
 298   return _gc_state.is_unset(MARKING | EVACUATION | UPDATEREFS | TRAVERSAL);
 299 }
 300 
 301 inline bool ShenandoahHeap::is_concurrent_mark_in_progress() const {


< prev index next >