< prev index next >

src/hotspot/share/gc/shared/ageTable.hpp

Print this page
rev 57223 : imported patch 8225484-changes-to-survivor-calculation


  40   friend class VMStructs;
  41 
  42  public:
  43   // constants
  44   enum { table_size = markWord::max_age + 1 };
  45 
  46   // instance variables
  47   size_t sizes[table_size];
  48 
  49   // constructor.  "global" indicates that this is the global age table
  50   // (as opposed to gc-thread-local)
  51   AgeTable(bool global = true);
  52 
  53   // clear table
  54   void clear();
  55 
  56   // add entry
  57   inline void add(oop p, size_t oop_size);
  58 
  59   void add(uint age, size_t oop_size) {
  60     assert(age > 0 && age < table_size, "invalid age of object");
  61     sizes[age] += oop_size;
  62   }
  63 
  64   // Merge another age table with the current one.  Used
  65   // for parallel young generation gc.
  66   void merge(AgeTable* subTable);
  67 
  68   // Calculate new tenuring threshold based on age information.
  69   uint compute_tenuring_threshold(size_t desired_survivor_size);
  70   void print_age_table(uint tenuring_threshold);
  71 
  72  private:
  73 
  74   PerfVariable* _perf_sizes[table_size];
  75 };
  76 
  77 #endif // SHARE_GC_SHARED_AGETABLE_HPP


  40   friend class VMStructs;
  41 
  42  public:
  43   // constants
  44   enum { table_size = markWord::max_age + 1 };
  45 
  46   // instance variables
  47   size_t sizes[table_size];
  48 
  49   // constructor.  "global" indicates that this is the global age table
  50   // (as opposed to gc-thread-local)
  51   AgeTable(bool global = true);
  52 
  53   // clear table
  54   void clear();
  55 
  56   // add entry
  57   inline void add(oop p, size_t oop_size);
  58 
  59   void add(uint age, size_t oop_size) {
  60     assert(age < table_size, "invalid age of object");
  61     sizes[age] += oop_size;
  62   }
  63 
  64   // Merge another age table with the current one.  Used
  65   // for parallel young generation gc.
  66   void merge(AgeTable* subTable);
  67 
  68   // Calculate new tenuring threshold based on age information.
  69   uint compute_tenuring_threshold(size_t desired_survivor_size);
  70   void print_age_table(uint tenuring_threshold);
  71 
  72  private:
  73 
  74   PerfVariable* _perf_sizes[table_size];
  75 };
  76 
  77 #endif // SHARE_GC_SHARED_AGETABLE_HPP
< prev index next >