src/hotspot/share/classfile/classLoader.inline.hpp
changeset 58447 319173c62caa
parent 54927 1512d88b24c6
child 59247 56bf71d64d51
equal deleted inserted replaced
58446:5c83830390ba 58447:319173c62caa
    60 
    60 
    61 // Helper function used by CDS code to get the number of boot classpath
    61 // Helper function used by CDS code to get the number of boot classpath
    62 // entries during shared classpath setup time.
    62 // entries during shared classpath setup time.
    63 
    63 
    64 inline int ClassLoader::num_boot_classpath_entries() {
    64 inline int ClassLoader::num_boot_classpath_entries() {
    65   assert(DumpSharedSpaces || DynamicDumpSharedSpaces,
    65   Arguments::assert_is_dumping_archive();
    66          "Should only be called at CDS dump time");
       
    67   assert(has_jrt_entry(), "must have a java runtime image");
    66   assert(has_jrt_entry(), "must have a java runtime image");
    68   int num_entries = 1; // count the runtime image
    67   int num_entries = 1; // count the runtime image
    69   ClassPathEntry* e = ClassLoader::_first_append_entry;
    68   ClassPathEntry* e = ClassLoader::_first_append_entry;
    70   while (e != NULL) {
    69   while (e != NULL) {
    71     num_entries ++;
    70     num_entries ++;
    83 }
    82 }
    84 
    83 
    85 // Helper function used by CDS code to get the number of app classpath
    84 // Helper function used by CDS code to get the number of app classpath
    86 // entries during shared classpath setup time.
    85 // entries during shared classpath setup time.
    87 inline int ClassLoader::num_app_classpath_entries() {
    86 inline int ClassLoader::num_app_classpath_entries() {
    88   assert(DumpSharedSpaces || DynamicDumpSharedSpaces,
    87   Arguments::assert_is_dumping_archive();
    89          "Should only be called at CDS dump time");
       
    90   int num_entries = 0;
    88   int num_entries = 0;
    91   ClassPathEntry* e= ClassLoader::_app_classpath_entries;
    89   ClassPathEntry* e= ClassLoader::_app_classpath_entries;
    92   while (e != NULL) {
    90   while (e != NULL) {
    93     num_entries ++;
    91     num_entries ++;
    94     e = e->next();
    92     e = e->next();