1347
1348 // For boot loader, ensure that GetSystemPackage knows that a class in this
1349 // package was loaded.
1350 if (class_loader.is_null()) {
1351 int path_index = ik->shared_classpath_index();
1352 ResourceMark rm;
1353 ClassLoader::add_package(ik->name()->as_C_string(), path_index, THREAD);
1354 }
1355
1356 if (DumpLoadedClassList != NULL && classlist_file->is_open()) {
1357 // Only dump the classes that can be stored into CDS archive
1358 if (SystemDictionaryShared::is_sharing_possible(loader_data)) {
1359 ResourceMark rm(THREAD);
1360 classlist_file->print_cr("%s", ik->name()->as_C_string());
1361 classlist_file->flush();
1362 }
1363 }
1364
1365 // notify a class loaded from shared object
1366 ClassLoadingService::notify_class_loaded(ik, true /* shared class */);
1367 }
1368
1369 ik->set_has_passed_fingerprint_check(false);
1370 if (UseAOT && ik->supers_have_passed_fingerprint_checks()) {
1371 uint64_t aot_fp = AOTLoader::get_saved_fingerprint(ik);
1372 uint64_t cds_fp = ik->get_stored_fingerprint();
1373 if (aot_fp != 0 && aot_fp == cds_fp) {
1374 // This class matches with a class saved in an AOT library
1375 ik->set_has_passed_fingerprint_check(true);
1376 } else {
1377 ResourceMark rm;
1378 log_info(class, fingerprint)("%s : expected = " PTR64_FORMAT " actual = " PTR64_FORMAT, ik->external_name(), aot_fp, cds_fp);
1379 }
1380 }
1381 return ik;
1382 }
1383
1384 void SystemDictionary::clear_invoke_method_table() {
1385 SymbolPropertyEntry* spe = NULL;
1386 for (int index = 0; index < _invoke_method_table->table_size(); index++) {
1387 SymbolPropertyEntry* p = _invoke_method_table->bucket(index);
1388 while (p != NULL) {
1389 spe = p;
1390 p = p->next();
1391 _invoke_method_table->free_entry(spe);
1392 }
1393 }
1394 }
1395 #endif // INCLUDE_CDS
1396
1397 InstanceKlass* SystemDictionary::load_instance_class(Symbol* class_name, Handle class_loader, TRAPS) {
1398
|
1347
1348 // For boot loader, ensure that GetSystemPackage knows that a class in this
1349 // package was loaded.
1350 if (class_loader.is_null()) {
1351 int path_index = ik->shared_classpath_index();
1352 ResourceMark rm;
1353 ClassLoader::add_package(ik->name()->as_C_string(), path_index, THREAD);
1354 }
1355
1356 if (DumpLoadedClassList != NULL && classlist_file->is_open()) {
1357 // Only dump the classes that can be stored into CDS archive
1358 if (SystemDictionaryShared::is_sharing_possible(loader_data)) {
1359 ResourceMark rm(THREAD);
1360 classlist_file->print_cr("%s", ik->name()->as_C_string());
1361 classlist_file->flush();
1362 }
1363 }
1364
1365 // notify a class loaded from shared object
1366 ClassLoadingService::notify_class_loaded(ik, true /* shared class */);
1367
1368 ik->set_has_passed_fingerprint_check(false);
1369 if (UseAOT && ik->supers_have_passed_fingerprint_checks()) {
1370 uint64_t aot_fp = AOTLoader::get_saved_fingerprint(ik);
1371 uint64_t cds_fp = ik->get_stored_fingerprint();
1372 if (aot_fp != 0 && aot_fp == cds_fp) {
1373 // This class matches with a class saved in an AOT library
1374 ik->set_has_passed_fingerprint_check(true);
1375 } else {
1376 ResourceMark rm;
1377 log_info(class, fingerprint)("%s : expected = " PTR64_FORMAT " actual = " PTR64_FORMAT, ik->external_name(), aot_fp, cds_fp);
1378 }
1379 }
1380 }
1381 return ik;
1382 }
1383
1384 void SystemDictionary::clear_invoke_method_table() {
1385 SymbolPropertyEntry* spe = NULL;
1386 for (int index = 0; index < _invoke_method_table->table_size(); index++) {
1387 SymbolPropertyEntry* p = _invoke_method_table->bucket(index);
1388 while (p != NULL) {
1389 spe = p;
1390 p = p->next();
1391 _invoke_method_table->free_entry(spe);
1392 }
1393 }
1394 }
1395 #endif // INCLUDE_CDS
1396
1397 InstanceKlass* SystemDictionary::load_instance_class(Symbol* class_name, Handle class_loader, TRAPS) {
1398
|