Mercurial > hg > truffle
comparison src/share/vm/classfile/classLoader.cpp @ 11015:7ee0d5c53c78
Merge
author | chegar |
---|---|
date | Wed, 08 May 2013 15:25:08 +0100 |
parents | d1c9384eecb4 |
children | 836a62f43af9 6e04c193845f |
comparison
equal
deleted
inserted
replaced
11014:4b52137b07c9 | 11015:7ee0d5c53c78 |
---|---|
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 { |