< prev index next >

src/share/vm/memory/generation.hpp

Print this page
rev 7474 : imported patch separateCardGeneration


 567   struct StatRecord {
 568     int invocations;
 569     elapsedTimer accumulated_time;
 570     StatRecord() :
 571       invocations(0),
 572       accumulated_time(elapsedTimer()) {}
 573   };
 574 private:
 575   StatRecord _stat_record;
 576 public:
 577   StatRecord* stat_record() { return &_stat_record; }
 578 
 579   virtual void print_summary_info();
 580   virtual void print_summary_info_on(outputStream* st);
 581 
 582   // Performance Counter support
 583   virtual void update_counters() = 0;
 584   virtual CollectorCounters* counters() { return _gc_counters; }
 585 };
 586 
 587 // Class CardGeneration is a generation that is covered by a card table,
 588 // and uses a card-size block-offset array to implement block_start.
 589 
 590 // class BlockOffsetArray;
 591 // class BlockOffsetArrayContigSpace;
 592 class BlockOffsetSharedArray;
 593 
 594 class CardGeneration: public Generation {
 595   friend class VMStructs;
 596  protected:
 597   // This is shared with other generations.
 598   GenRemSet* _rs;
 599   // This is local to this generation.
 600   BlockOffsetSharedArray* _bts;
 601 
 602   // current shrinking effect: this damps shrinking when the heap gets empty.
 603   size_t _shrink_factor;
 604 
 605   size_t _min_heap_delta_bytes;   // Minimum amount to expand.
 606 
 607   // Some statistics from before gc started.
 608   // These are gathered in the gc_prologue (and should_collect)
 609   // to control growing/shrinking policy in spite of promotions.
 610   size_t _capacity_at_prologue;
 611   size_t _used_at_prologue;
 612 
 613   CardGeneration(ReservedSpace rs, size_t initial_byte_size, int level,
 614                  GenRemSet* remset);
 615 
 616  public:
 617 
 618   // Attempt to expand the generation by "bytes".  Expand by at a
 619   // minimum "expand_bytes".  Return true if some amount (not
 620   // necessarily the full "bytes") was done.
 621   virtual bool expand(size_t bytes, size_t expand_bytes);
 622 
 623   // Shrink generation with specified size (returns false if unable to shrink)
 624   virtual void shrink(size_t bytes) = 0;
 625 
 626   virtual void compute_new_size();
 627 
 628   virtual void clear_remembered_set();
 629 
 630   virtual void invalidate_remembered_set();
 631 
 632   virtual void prepare_for_verify();
 633 
 634   // Grow generation with specified size (returns false if unable to grow)
 635   virtual bool grow_by(size_t bytes) = 0;
 636   // Grow generation to reserved size.
 637   virtual bool grow_to_reserved() = 0;
 638 };
 639 
 640 #endif // SHARE_VM_MEMORY_GENERATION_HPP


 567   struct StatRecord {
 568     int invocations;
 569     elapsedTimer accumulated_time;
 570     StatRecord() :
 571       invocations(0),
 572       accumulated_time(elapsedTimer()) {}
 573   };
 574 private:
 575   StatRecord _stat_record;
 576 public:
 577   StatRecord* stat_record() { return &_stat_record; }
 578 
 579   virtual void print_summary_info();
 580   virtual void print_summary_info_on(outputStream* st);
 581 
 582   // Performance Counter support
 583   virtual void update_counters() = 0;
 584   virtual CollectorCounters* counters() { return _gc_counters; }
 585 };
 586 





















































 587 #endif // SHARE_VM_MEMORY_GENERATION_HPP
< prev index next >