< 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     // With compact headers, the objects can be one-word sized.
399     size_t int_off = UseCompactObjectHeaders ? MIN2((size_t)1, obj->size() - 1) : 1;
400     HeapWord* test_addr = cast_from_oop<HeapWord*>(obj) + int_off;
401     guarantee(_start_array->object_start(test_addr) == cast_from_oop<HeapWord*>(obj), "ObjectStartArray cannot find start of object");
402     guarantee(_start_array->is_block_allocated(cast_from_oop<HeapWord*>(obj)), "ObjectStartArray missing block allocation");
403   }
404 };
405 
406 void PSOldGen::verify_object_start_array() {
407   VerifyObjectStartArrayClosure check(&_start_array);
408   object_iterate(&check);
409 }
410 
411 #ifndef PRODUCT
412 void PSOldGen::record_spaces_top() {
413   assert(ZapUnusedHeapArea, "Not mangling unused space");
414   object_space()->set_top_for_allocations();
415 }
416 #endif
< prev index next >