8371894: Minor style fixes in AOT/CDS code

Reviewed-by: stefank, kvn, iklam
This commit is contained in:
Joel Sikström 2025-11-17 08:50:50 +00:00
parent 8690d263d9
commit d032b28d9d
4 changed files with 26 additions and 27 deletions

View File

@ -526,7 +526,7 @@ void CDSConfig::check_aotmode_record() {
bool has_output = !FLAG_IS_DEFAULT(AOTCacheOutput);
if (!has_output && !has_config) {
vm_exit_during_initialization("At least one of AOTCacheOutput and AOTConfiguration must be specified when using -XX:AOTMode=record");
vm_exit_during_initialization("At least one of AOTCacheOutput and AOTConfiguration must be specified when using -XX:AOTMode=record");
}
if (has_output) {

View File

@ -290,7 +290,7 @@ public:
void log_paths(const char* msg, int start_idx, int end_idx);
FileMapInfo(const char* full_apth, bool is_static);
FileMapInfo(const char* full_path, bool is_static);
~FileMapInfo();
static void free_current_info();

View File

@ -631,9 +631,8 @@ void HeapShared::init_scratch_objects_for_basic_type_mirrors(TRAPS) {
}
// Given java_mirror that represents a (primitive or reference) type T,
// return the "scratch" version that represents the same type T.
// Note that if java_mirror will be returned if it's already a
// scratch mirror.
// return the "scratch" version that represents the same type T. Note
// that java_mirror will be returned if the mirror is already a scratch mirror.
//
// See java_lang_Class::create_scratch_mirror() for more info.
oop HeapShared::scratch_java_mirror(oop java_mirror) {

View File

@ -557,32 +557,32 @@ void Universe::genesis(TRAPS) {
void Universe::initialize_basic_type_mirrors(TRAPS) {
#if INCLUDE_CDS_JAVA_HEAP
if (CDSConfig::is_using_archive() &&
HeapShared::is_archived_heap_in_use() &&
_basic_type_mirrors[T_INT].resolve() != nullptr) {
// check that all basic type mirrors are mapped also
for (int i = T_BOOLEAN; i < T_VOID+1; i++) {
if (!is_reference_type((BasicType)i)) {
oop m = _basic_type_mirrors[i].resolve();
assert(m != nullptr, "archived mirrors should not be null");
}
if (CDSConfig::is_using_archive() &&
HeapShared::is_archived_heap_in_use() &&
_basic_type_mirrors[T_INT].resolve() != nullptr) {
// check that all basic type mirrors are mapped also
for (int i = T_BOOLEAN; i < T_VOID+1; i++) {
if (!is_reference_type((BasicType)i)) {
oop m = _basic_type_mirrors[i].resolve();
assert(m != nullptr, "archived mirrors should not be null");
}
} else
// _basic_type_mirrors[T_INT], etc, are null if not using an archived heap
}
} else
// _basic_type_mirrors[T_INT], etc, are null if not using an archived heap
#endif
{
for (int i = T_BOOLEAN; i < T_VOID+1; i++) {
BasicType bt = (BasicType)i;
if (!is_reference_type(bt)) {
oop m = java_lang_Class::create_basic_type_mirror(type2name(bt), bt, CHECK);
_basic_type_mirrors[i] = OopHandle(vm_global(), m);
}
CDS_JAVA_HEAP_ONLY(_archived_basic_type_mirror_indices[i] = -1);
{
for (int i = T_BOOLEAN; i < T_VOID+1; i++) {
BasicType bt = (BasicType)i;
if (!is_reference_type(bt)) {
oop m = java_lang_Class::create_basic_type_mirror(type2name(bt), bt, CHECK);
_basic_type_mirrors[i] = OopHandle(vm_global(), m);
}
CDS_JAVA_HEAP_ONLY(_archived_basic_type_mirror_indices[i] = -1);
}
if (CDSConfig::is_dumping_heap()) {
HeapShared::init_scratch_objects_for_basic_type_mirrors(CHECK);
}
}
if (CDSConfig::is_dumping_heap()) {
HeapShared::init_scratch_objects_for_basic_type_mirrors(CHECK);
}
}
void Universe::fixup_mirrors(TRAPS) {