Skip to content

Commit

Permalink
call assign_class_loader_type() in KlassFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinccheung committed Mar 20, 2024
1 parent 923ef35 commit c39f89e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
4 changes: 0 additions & 4 deletions src/hotspot/share/cds/archiveBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -740,10 +740,6 @@ void ArchiveBuilder::make_klasses_shareable() {
assert(k->is_instance_klass(), " must be");
num_instance_klasses ++;
InstanceKlass* ik = InstanceKlass::cast(k);
if (CDSConfig::is_dumping_dynamic_archive()) {
// For static dump, class loader type are already set.
ik->assign_class_loader_type();
}
if (ik->is_shared_boot_class()) {
type = "boot";
num_boot_klasses ++;
Expand Down
1 change: 1 addition & 0 deletions src/hotspot/share/classfile/klassFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ InstanceKlass* KlassFactory::check_shared_class_file_load_hook(

if (class_loader.is_null()) {
new_ik->set_classpath_index(path_index);
new_ik->assign_class_loader_type();
}

return new_ik;
Expand Down
5 changes: 0 additions & 5 deletions src/hotspot/share/oops/instanceKlass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -972,11 +972,6 @@ void InstanceKlass::rewrite_class(TRAPS) {
}
Rewriter::rewrite(this, CHECK);
set_rewritten();
#if INCLUDE_CDS
if (CDSConfig::is_dumping_dynamic_archive()) {
assign_class_loader_type();
}
#endif
}

// Now relocate and link method entry points after class is rewritten.
Expand Down

0 comments on commit c39f89e

Please sign in to comment.