53 // clear table |
53 // clear table |
54 void clear(); |
54 void clear(); |
55 |
55 |
56 // add entry |
56 // add entry |
57 void add(oop p, size_t oop_size) { |
57 void add(oop p, size_t oop_size) { |
58 int age = p->age(); |
58 uint age = p->age(); |
59 assert(age > 0 && age < table_size, "invalid age of object"); |
59 assert(age > 0 && age < table_size, "invalid age of object"); |
60 sizes[age] += oop_size; |
60 sizes[age] += oop_size; |
61 } |
61 } |
62 |
62 |
63 // Merge another age table with the current one. Used |
63 // Merge another age table with the current one. Used |
64 // for parallel young generation gc. |
64 // for parallel young generation gc. |
65 void merge(ageTable* subTable); |
65 void merge(ageTable* subTable); |
66 void merge_par(ageTable* subTable); |
66 void merge_par(ageTable* subTable); |
67 |
67 |
68 // calculate new tenuring threshold based on age information |
68 // calculate new tenuring threshold based on age information |
69 int compute_tenuring_threshold(size_t survivor_capacity); |
69 uint compute_tenuring_threshold(size_t survivor_capacity); |
70 |
70 |
71 private: |
71 private: |
72 PerfVariable* _perf_sizes[table_size]; |
72 PerfVariable* _perf_sizes[table_size]; |
73 }; |
73 }; |
74 |
74 |