for (size_t i = 1; i <= num_to_add; i++) {
root_set.add((nmethod*) 1);
}
ASSERT_EQ(root_set.length(), (size_t) 1)
<< "Duplicate detection should not have increased the set size but "
<< "is " << root_set.length();
for (size_t i = 2; i <= num_to_add; i++) {
root_set.add((nmethod*) (uintptr_t) (i));
}
ASSERT_EQ(root_set.length(), num_to_add)
<< "After adding in total " << num_to_add << " distinct code roots, " "they need to be in the set, but there are only " << root_set.length();
ASSERT_NE(purge_list(), (G1CodeRootSetTable*) NULL)
<< "should have grown to large hashtable";
size_t num_popped = 0; for (size_t i = 1; i <= num_to_add; i++) { bool removed = root_set.remove((nmethod*) i); if (removed) {
num_popped += 1;
} else { break;
}
}
ASSERT_EQ(num_popped, num_to_add)
<< "Managed to pop " << num_popped << " code roots, but only "
<< num_to_add << " were added";
ASSERT_NE(purge_list(), (G1CodeRootSetTable*) NULL)
<< "should have grown to large hashtable";
G1CodeRootSet::purge();
ASSERT_EQ(purge_list(), (G1CodeRootSetTable*) NULL)
<< "should have purged old small tables";
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-10-12)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.