equal
deleted
inserted
replaced
38 #include "memory/filemap.hpp" |
38 #include "memory/filemap.hpp" |
39 #include "memory/metaspace.hpp" |
39 #include "memory/metaspace.hpp" |
40 #include "memory/metaspaceShared.hpp" |
40 #include "memory/metaspaceShared.hpp" |
41 #include "oops/objArrayOop.hpp" |
41 #include "oops/objArrayOop.hpp" |
42 #include "oops/oop.inline.hpp" |
42 #include "oops/oop.inline.hpp" |
43 #include "runtime/logTimer.hpp" |
43 #include "runtime/timerTrace.hpp" |
44 #include "runtime/os.hpp" |
44 #include "runtime/os.hpp" |
45 #include "runtime/signature.hpp" |
45 #include "runtime/signature.hpp" |
46 #include "runtime/vmThread.hpp" |
46 #include "runtime/vmThread.hpp" |
47 #include "runtime/vm_operations.hpp" |
47 #include "runtime/vm_operations.hpp" |
48 #include "utilities/defaultStream.hpp" |
48 #include "utilities/defaultStream.hpp" |
773 } |
773 } |
774 |
774 |
775 // Preload classes from a list, populate the shared spaces and dump to a |
775 // Preload classes from a list, populate the shared spaces and dump to a |
776 // file. |
776 // file. |
777 void MetaspaceShared::preload_and_dump(TRAPS) { |
777 void MetaspaceShared::preload_and_dump(TRAPS) { |
778 { TraceStartupTime timer("Dump Shared Spaces"); |
778 { TraceTime timer("Dump Shared Spaces", TRACETIME_LOG(Info, startuptime)); |
779 ResourceMark rm; |
779 ResourceMark rm; |
780 char class_list_path_str[JVM_MAXPATHLEN]; |
780 char class_list_path_str[JVM_MAXPATHLEN]; |
781 |
781 |
782 tty->print_cr("Allocated shared space: " SIZE_FORMAT " bytes at " PTR_FORMAT, |
782 tty->print_cr("Allocated shared space: " SIZE_FORMAT " bytes at " PTR_FORMAT, |
783 MetaspaceShared::shared_rs()->size(), |
783 MetaspaceShared::shared_rs()->size(), |
880 tty->print_cr("Shared spaces preloaded: %s", klass->external_name()); |
880 tty->print_cr("Shared spaces preloaded: %s", klass->external_name()); |
881 } |
881 } |
882 |
882 |
883 InstanceKlass* ik = InstanceKlass::cast(klass); |
883 InstanceKlass* ik = InstanceKlass::cast(klass); |
884 |
884 |
885 // Should be class load order as per -XX:+TraceClassLoadingPreorder |
885 // Should be class load order as per -Xlog:classload+preorder |
886 class_promote_order->append(ik); |
886 class_promote_order->append(ik); |
887 |
887 |
888 // Link the class to cause the bytecodes to be rewritten and the |
888 // Link the class to cause the bytecodes to be rewritten and the |
889 // cpcache to be created. The linking is done as soon as classes |
889 // cpcache to be created. The linking is done as soon as classes |
890 // are loaded in order that the related data structures (klass and |
890 // are loaded in order that the related data structures (klass and |