523
524 // Returns the address of the start of the "block" that contains the
525 // address "addr". We say "blocks" instead of "object" since some heaps
526 // may not pack objects densely; a chunk may either be an object or a
527 // non-object.
528 virtual HeapWord* block_start(const void* addr) const;
529
530 // Requires "addr" to be the start of a chunk, and returns its size.
531 // "addr + size" is required to be the start of a new chunk, or the end
532 // of the active area of the heap.
533 virtual size_t block_size(const HeapWord* addr) const ;
534
535 // Requires "addr" to be the start of a block, and returns "TRUE" iff
536 // the block is an object.
537 virtual bool block_is_obj(const HeapWord* addr) const;
538
539
540 // PrintGC, PrintGCDetails support
541 void print_heap_change(size_t prev_used) const;
542
543 // PrintHeapAtGC support
544 virtual void print() const;
545 virtual void print_on(outputStream* st) const;
546
547 virtual void verify() = 0;
548
549 struct StatRecord {
550 int invocations;
551 elapsedTimer accumulated_time;
552 StatRecord() :
553 invocations(0),
554 accumulated_time(elapsedTimer()) {}
555 };
556 private:
557 StatRecord _stat_record;
558 public:
559 StatRecord* stat_record() { return &_stat_record; }
560
561 virtual void print_summary_info();
562 virtual void print_summary_info_on(outputStream* st);
563
|
523
524 // Returns the address of the start of the "block" that contains the
525 // address "addr". We say "blocks" instead of "object" since some heaps
526 // may not pack objects densely; a chunk may either be an object or a
527 // non-object.
528 virtual HeapWord* block_start(const void* addr) const;
529
530 // Requires "addr" to be the start of a chunk, and returns its size.
531 // "addr + size" is required to be the start of a new chunk, or the end
532 // of the active area of the heap.
533 virtual size_t block_size(const HeapWord* addr) const ;
534
535 // Requires "addr" to be the start of a block, and returns "TRUE" iff
536 // the block is an object.
537 virtual bool block_is_obj(const HeapWord* addr) const;
538
539
540 // PrintGC, PrintGCDetails support
541 void print_heap_change(size_t prev_used) const;
542
543 virtual void print() const;
544 virtual void print_on(outputStream* st) const;
545
546 virtual void verify() = 0;
547
548 struct StatRecord {
549 int invocations;
550 elapsedTimer accumulated_time;
551 StatRecord() :
552 invocations(0),
553 accumulated_time(elapsedTimer()) {}
554 };
555 private:
556 StatRecord _stat_record;
557 public:
558 StatRecord* stat_record() { return &_stat_record; }
559
560 virtual void print_summary_info();
561 virtual void print_summary_info_on(outputStream* st);
562
|