8209821: Make JVMTI GetClassLoaderClasses not walk CLDG

And also added function with KlassClosure to remove the hacks.

Reviewed-by: lfoltan, sspitsyn
This commit is contained in:
Coleen Phillimore 2018-08-25 11:10:21 -04:00
parent 51c04f947f
commit fd9fa38d21
10 changed files with 62 additions and 258 deletions

View file

@ -330,13 +330,13 @@ void Dictionary::classes_do(void f(InstanceKlass*, TRAPS), TRAPS) {
}
// All classes, and their class loaders, including initiating class loaders
void Dictionary::all_entries_do(void f(InstanceKlass*, ClassLoaderData*)) {
void Dictionary::all_entries_do(KlassClosure* closure) {
for (int index = 0; index < table_size(); index++) {
for (DictionaryEntry* probe = bucket(index);
probe != NULL;
probe = probe->next()) {
InstanceKlass* k = probe->instance_klass();
f(k, loader_data());
closure->do_klass(k);
}
}
}