391 void PSOldGen::update_counters() {
392 if (UsePerfData) {
393 _space_counters->update_all();
394 _gen_counters->update_all();
395 }
396 }
397
398 void PSOldGen::verify() {
399 object_space()->verify();
400 }
401
402 class VerifyObjectStartArrayClosure : public ObjectClosure {
403 PSOldGen* _old_gen;
404 ObjectStartArray* _start_array;
405
406 public:
407 VerifyObjectStartArrayClosure(PSOldGen* old_gen, ObjectStartArray* start_array) :
408 _old_gen(old_gen), _start_array(start_array) { }
409
410 virtual void do_object(oop obj) {
411 HeapWord* test_addr = cast_from_oop<HeapWord*>(obj) + 1;
412 guarantee(_start_array->object_start(test_addr) == cast_from_oop<HeapWord*>(obj), "ObjectStartArray cannot find start of object");
413 guarantee(_start_array->is_block_allocated(cast_from_oop<HeapWord*>(obj)), "ObjectStartArray missing block allocation");
414 }
415 };
416
417 void PSOldGen::verify_object_start_array() {
418 VerifyObjectStartArrayClosure check( this, &_start_array );
419 object_iterate(&check);
420 }
421
422 #ifndef PRODUCT
423 void PSOldGen::record_spaces_top() {
424 assert(ZapUnusedHeapArea, "Not mangling unused space");
425 object_space()->set_top_for_allocations();
426 }
427 #endif
|
391 void PSOldGen::update_counters() {
392 if (UsePerfData) {
393 _space_counters->update_all();
394 _gen_counters->update_all();
395 }
396 }
397
398 void PSOldGen::verify() {
399 object_space()->verify();
400 }
401
402 class VerifyObjectStartArrayClosure : public ObjectClosure {
403 PSOldGen* _old_gen;
404 ObjectStartArray* _start_array;
405
406 public:
407 VerifyObjectStartArrayClosure(PSOldGen* old_gen, ObjectStartArray* start_array) :
408 _old_gen(old_gen), _start_array(start_array) { }
409
410 virtual void do_object(oop obj) {
411 HeapWord* test_addr = cast_from_oop<HeapWord*>(obj);
412 guarantee(_start_array->object_start(test_addr) == cast_from_oop<HeapWord*>(obj), "ObjectStartArray cannot find start of object");
413 guarantee(_start_array->is_block_allocated(cast_from_oop<HeapWord*>(obj)), "ObjectStartArray missing block allocation");
414 }
415 };
416
417 void PSOldGen::verify_object_start_array() {
418 VerifyObjectStartArrayClosure check( this, &_start_array );
419 object_iterate(&check);
420 }
421
422 #ifndef PRODUCT
423 void PSOldGen::record_spaces_top() {
424 assert(ZapUnusedHeapArea, "Not mangling unused space");
425 object_space()->set_top_for_allocations();
426 }
427 #endif
|