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 uint age = p->age(); |
58 add(p->age(), oop_size); |
|
59 } |
|
60 |
|
61 void add(uint age, size_t oop_size) { |
59 assert(age > 0 && age < table_size, "invalid age of object"); |
62 assert(age > 0 && age < table_size, "invalid age of object"); |
60 sizes[age] += oop_size; |
63 sizes[age] += oop_size; |
61 } |
64 } |
62 |
65 |
63 // Merge another age table with the current one. Used |
66 // Merge another age table with the current one. Used |