< prev index next >

src/hotspot/share/gc/parallel/psOldGen.cpp

Print this page

378 
379 void PSOldGen::update_counters() {
380   if (UsePerfData) {
381     _space_counters->update_all();
382     _gen_counters->update_all();
383   }
384 }
385 
386 void PSOldGen::verify() {
387   object_space()->verify();
388 }
389 
390 class VerifyObjectStartArrayClosure : public ObjectClosure {
391   ObjectStartArray* _start_array;
392 
393  public:
394   VerifyObjectStartArrayClosure(ObjectStartArray* start_array) :
395     _start_array(start_array) { }
396 
397   virtual void do_object(oop obj) {
398     HeapWord* test_addr = cast_from_oop<HeapWord*>(obj) + 1;
399     guarantee(_start_array->object_start(test_addr) == cast_from_oop<HeapWord*>(obj), "ObjectStartArray cannot find start of object");
400     guarantee(_start_array->is_block_allocated(cast_from_oop<HeapWord*>(obj)), "ObjectStartArray missing block allocation");
401   }
402 };
403 
404 void PSOldGen::verify_object_start_array() {
405   VerifyObjectStartArrayClosure check(&_start_array);
406   object_iterate(&check);
407 }
408 
409 #ifndef PRODUCT
410 void PSOldGen::record_spaces_top() {
411   assert(ZapUnusedHeapArea, "Not mangling unused space");
412   object_space()->set_top_for_allocations();
413 }
414 #endif

378 
379 void PSOldGen::update_counters() {
380   if (UsePerfData) {
381     _space_counters->update_all();
382     _gen_counters->update_all();
383   }
384 }
385 
386 void PSOldGen::verify() {
387   object_space()->verify();
388 }
389 
390 class VerifyObjectStartArrayClosure : public ObjectClosure {
391   ObjectStartArray* _start_array;
392 
393  public:
394   VerifyObjectStartArrayClosure(ObjectStartArray* start_array) :
395     _start_array(start_array) { }
396 
397   virtual void do_object(oop obj) {
398     HeapWord* test_addr = cast_from_oop<HeapWord*>(obj);
399     guarantee(_start_array->object_start(test_addr) == cast_from_oop<HeapWord*>(obj), "ObjectStartArray cannot find start of object");
400     guarantee(_start_array->is_block_allocated(cast_from_oop<HeapWord*>(obj)), "ObjectStartArray missing block allocation");
401   }
402 };
403 
404 void PSOldGen::verify_object_start_array() {
405   VerifyObjectStartArrayClosure check(&_start_array);
406   object_iterate(&check);
407 }
408 
409 #ifndef PRODUCT
410 void PSOldGen::record_spaces_top() {
411   assert(ZapUnusedHeapArea, "Not mangling unused space");
412   object_space()->set_top_for_allocations();
413 }
414 #endif
< prev index next >