8064473: Improved handling of age during object copy in G1

Reviewed-by: brutisso, tschatzl
This commit is contained in:
Staffan Friberg 2014-11-14 15:03:39 +01:00
parent 4feb7b4dab
commit 04bdb774e1
5 changed files with 28 additions and 31 deletions

View file

@ -55,7 +55,10 @@ class ageTable VALUE_OBJ_CLASS_SPEC {
// add entry
void add(oop p, size_t oop_size) {
uint age = p->age();
add(p->age(), oop_size);
}
void add(uint age, size_t oop_size) {
assert(age > 0 && age < table_size, "invalid age of object");
sizes[age] += oop_size;
}