8166848: Performance bug: SystemDictionary - optimization

Check instead that a bucket isn't 10x the average

Reviewed-by: iklam, gziemski, sspitsyn
This commit is contained in:
Coleen Phillimore 2017-05-18 08:17:52 -04:00
parent 553d1e815b
commit f820e2f2ee
9 changed files with 55 additions and 191 deletions

View file

@ -510,18 +510,7 @@ void ModuleEntry::print(outputStream* st) {
}
void ModuleEntryTable::verify() {
int element_count = 0;
for (int i = 0; i < table_size(); i++) {
for (ModuleEntry* probe = bucket(i);
probe != NULL;
probe = probe->next()) {
probe->verify();
element_count++;
}
}
guarantee(number_of_entries() == element_count,
"Verify of Module Entry Table failed");
DEBUG_ONLY(verify_lookup_length((double)number_of_entries() / table_size(), "Module Entry Table"));
verify_table<ModuleEntry>("Module Entry Table");
}
void ModuleEntry::verify() {