comparison src/share/vm/classfile/classLoader.cpp @ 10408:836a62f43af9

Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author Doug Simon <doug.simon@oracle.com>
date Wed, 19 Jun 2013 10:45:56 +0200
parents 43223d3f5dcd d1c9384eecb4
children 3cce976666d9
comparison
equal deleted inserted replaced
10086:e0fb8a213650 10408:836a62f43af9
1343 tty->print_cr("CompileTheWorld (%d) : Skipping %s", _compile_the_world_class_counter, buffer); 1343 tty->print_cr("CompileTheWorld (%d) : Skipping %s", _compile_the_world_class_counter, buffer);
1344 } else { 1344 } else {
1345 tty->print_cr("CompileTheWorld (%d) : %s", _compile_the_world_class_counter, buffer); 1345 tty->print_cr("CompileTheWorld (%d) : %s", _compile_the_world_class_counter, buffer);
1346 // Preload all classes to get around uncommon traps 1346 // Preload all classes to get around uncommon traps
1347 // Iterate over all methods in class 1347 // Iterate over all methods in class
1348 int comp_level = CompilationPolicy::policy()->initial_compile_level();
1348 for (int n = 0; n < k->methods()->length(); n++) { 1349 for (int n = 0; n < k->methods()->length(); n++) {
1349 methodHandle m (THREAD, k->methods()->at(n)); 1350 methodHandle m (THREAD, k->methods()->at(n));
1350 if (CompilationPolicy::can_be_compiled(m)) { 1351 if (CompilationPolicy::can_be_compiled(m, comp_level)) {
1351 1352
1352 if (++_codecache_sweep_counter == CompileTheWorldSafepointInterval) { 1353 if (++_codecache_sweep_counter == CompileTheWorldSafepointInterval) {
1353 // Give sweeper a chance to keep up with CTW 1354 // Give sweeper a chance to keep up with CTW
1354 VM_ForceSafepoint op; 1355 VM_ForceSafepoint op;
1355 VMThread::execute(&op); 1356 VMThread::execute(&op);
1356 _codecache_sweep_counter = 0; 1357 _codecache_sweep_counter = 0;
1357 } 1358 }
1358 // Force compilation 1359 // Force compilation
1359 CompileBroker::compile_method(m, InvocationEntryBci, CompilationPolicy::policy()->initial_compile_level(), 1360 CompileBroker::compile_method(m, InvocationEntryBci, comp_level,
1360 methodHandle(), 0, "CTW", THREAD); 1361 methodHandle(), 0, "CTW", THREAD);
1361 if (HAS_PENDING_EXCEPTION) { 1362 if (HAS_PENDING_EXCEPTION) {
1362 clear_pending_exception_if_not_oom(CHECK); 1363 clear_pending_exception_if_not_oom(CHECK);
1363 tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_class_counter, m->name()->as_C_string()); 1364 tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_class_counter, m->name()->as_C_string());
1364 } else { 1365 } else {