Mercurial > hg > graal-jvmci-8
diff src/share/vm/classfile/classLoader.cpp @ 9159:43223d3f5dcd
Merge with hsx/hotspot-comp
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 16 Apr 2013 17:39:46 +0200 |
parents | b8f261ba79c6 b8b081e53312 |
children | 836a62f43af9 |
line wrap: on
line diff
--- a/src/share/vm/classfile/classLoader.cpp Tue Apr 16 17:16:06 2013 +0200 +++ b/src/share/vm/classfile/classLoader.cpp Tue Apr 16 17:39:46 2013 +0200 @@ -1274,13 +1274,16 @@ Handle system_class_loader (THREAD, SystemDictionary::java_system_loader()); // Iterate over all bootstrap class path entries ClassPathEntry* e = _first_entry; + jlong start = os::javaTimeMillis(); while (e != NULL) { // We stop at rt.jar, unless it is the first bootstrap path entry if (e->is_rt_jar() && e != _first_entry) break; e->compile_the_world(system_class_loader, CATCH); e = e->next(); } - tty->print_cr("CompileTheWorld : Done"); + jlong end = os::javaTimeMillis(); + tty->print_cr("CompileTheWorld : Done (%d classes, %d methods, %d ms)", + _compile_the_world_class_counter, _compile_the_world_method_counter, (end - start)); { // Print statistics as if before normal exit: extern void print_statistics(); @@ -1289,7 +1292,8 @@ vm_exit(0); } -int ClassLoader::_compile_the_world_counter = 0; +int ClassLoader::_compile_the_world_class_counter = 0; +int ClassLoader::_compile_the_world_method_counter = 0; static int _codecache_sweep_counter = 0; // Filter out all exceptions except OOMs @@ -1311,8 +1315,8 @@ // If the file has a period after removing .class, it's not really a // valid class file. The class loader will check everything else. if (strchr(buffer, '.') == NULL) { - _compile_the_world_counter++; - if (_compile_the_world_counter > CompileTheWorldStopAt) return; + _compile_the_world_class_counter++; + if (_compile_the_world_class_counter > CompileTheWorldStopAt) return; // Construct name without extension TempNewSymbol sym = SymbolTable::new_symbol(buffer, CHECK); @@ -1329,16 +1333,16 @@ if (HAS_PENDING_EXCEPTION) { // If something went wrong in preloading we just ignore it clear_pending_exception_if_not_oom(CHECK); - tty->print_cr("Preloading failed for (%d) %s", _compile_the_world_counter, buffer); + tty->print_cr("Preloading failed for (%d) %s", _compile_the_world_class_counter, buffer); } } - if (_compile_the_world_counter >= CompileTheWorldStartAt) { + if (_compile_the_world_class_counter >= CompileTheWorldStartAt) { if (k.is_null() || exception_occurred) { // If something went wrong (e.g. ExceptionInInitializerError) we skip this class - tty->print_cr("CompileTheWorld (%d) : Skipping %s", _compile_the_world_counter, buffer); + tty->print_cr("CompileTheWorld (%d) : Skipping %s", _compile_the_world_class_counter, buffer); } else { - tty->print_cr("CompileTheWorld (%d) : %s", _compile_the_world_counter, buffer); + tty->print_cr("CompileTheWorld (%d) : %s", _compile_the_world_class_counter, buffer); // Preload all classes to get around uncommon traps // Iterate over all methods in class for (int n = 0; n < k->methods()->length(); n++) { @@ -1356,7 +1360,9 @@ methodHandle(), 0, "CTW", THREAD); if (HAS_PENDING_EXCEPTION) { clear_pending_exception_if_not_oom(CHECK); - tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_counter, m->name()->as_C_string()); + tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_class_counter, m->name()->as_C_string()); + } else { + _compile_the_world_method_counter++; } if (TieredCompilation && TieredStopAtLevel >= CompLevel_full_optimization) { // Clobber the first compile and force second tier compilation @@ -1370,7 +1376,9 @@ methodHandle(), 0, "CTW", THREAD); if (HAS_PENDING_EXCEPTION) { clear_pending_exception_if_not_oom(CHECK); - tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_counter, m->name()->as_C_string()); + tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_class_counter, m->name()->as_C_string()); + } else { + _compile_the_world_method_counter++; } } }