433 virtual void safe_object_iterate(ObjectClosure* cl) = 0; 434 435 // NOTE! There is no requirement that a collector implement these 436 // functions. 437 // 438 // A CollectedHeap is divided into a dense sequence of "blocks"; that is, 439 // each address in the (reserved) heap is a member of exactly 440 // one block. The defining characteristic of a block is that it is 441 // possible to find its size, and thus to progress forward to the next 442 // block. (Blocks may be of different sizes.) Thus, blocks may 443 // represent Java objects, or they might be free blocks in a 444 // free-list-based heap (or subheap), as long as the two kinds are 445 // distinguishable and the size of each is determinable. 446 447 // Returns the address of the start of the "block" that contains the 448 // address "addr". We say "blocks" instead of "object" since some heaps 449 // may not pack objects densely; a chunk may either be an object or a 450 // non-object. 451 virtual HeapWord* block_start(const void* addr) const = 0; 452 453 // Requires "addr" to be the start of a chunk, and returns its size. 454 // "addr + size" is required to be the start of a new chunk, or the end 455 // of the active area of the heap. 456 virtual size_t block_size(const HeapWord* addr) const = 0; 457 458 // Requires "addr" to be the start of a block, and returns "TRUE" iff 459 // the block is an object. 460 virtual bool block_is_obj(const HeapWord* addr) const = 0; 461 462 // Returns the longest time (in ms) that has elapsed since the last 463 // time that any part of the heap was examined by a garbage collection. 464 virtual jlong millis_since_last_gc() = 0; 465 466 // Perform any cleanup actions necessary before allowing a verification. 467 virtual void prepare_for_verify() = 0; 468 469 // Generate any dumps preceding or following a full gc 470 private: 471 void full_gc_dump(GCTimer* timer, bool before); 472 473 virtual void initialize_serviceability() = 0; 474 475 public: 476 void pre_full_gc_dump(GCTimer* timer); 477 void post_full_gc_dump(GCTimer* timer); | 433 virtual void safe_object_iterate(ObjectClosure* cl) = 0; 434 435 // NOTE! There is no requirement that a collector implement these 436 // functions. 437 // 438 // A CollectedHeap is divided into a dense sequence of "blocks"; that is, 439 // each address in the (reserved) heap is a member of exactly 440 // one block. The defining characteristic of a block is that it is 441 // possible to find its size, and thus to progress forward to the next 442 // block. (Blocks may be of different sizes.) Thus, blocks may 443 // represent Java objects, or they might be free blocks in a 444 // free-list-based heap (or subheap), as long as the two kinds are 445 // distinguishable and the size of each is determinable. 446 447 // Returns the address of the start of the "block" that contains the 448 // address "addr". We say "blocks" instead of "object" since some heaps 449 // may not pack objects densely; a chunk may either be an object or a 450 // non-object. 451 virtual HeapWord* block_start(const void* addr) const = 0; 452 453 // Requires "addr" to be the start of a block, and returns "TRUE" iff 454 // the block is an object. 455 virtual bool block_is_obj(const HeapWord* addr) const = 0; 456 457 // Returns the longest time (in ms) that has elapsed since the last 458 // time that any part of the heap was examined by a garbage collection. 459 virtual jlong millis_since_last_gc() = 0; 460 461 // Perform any cleanup actions necessary before allowing a verification. 462 virtual void prepare_for_verify() = 0; 463 464 // Generate any dumps preceding or following a full gc 465 private: 466 void full_gc_dump(GCTimer* timer, bool before); 467 468 virtual void initialize_serviceability() = 0; 469 470 public: 471 void pre_full_gc_dump(GCTimer* timer); 472 void post_full_gc_dump(GCTimer* timer); |