Print this page


Split Close
Expand all
Collapse all
          --- old/src/share/vm/classfile/classLoader.cpp
          +++ new/src/share/vm/classfile/classLoader.cpp
↓ open down ↓ 1342 lines elided ↑ open up ↑
1343 1343              methodHandle m (THREAD, methodOop(k->methods()->obj_at(n)));
1344 1344              if (CompilationPolicy::can_be_compiled(m)) {
1345 1345  
1346 1346                if (++_codecache_sweep_counter == CompileTheWorldSafepointInterval) {
1347 1347                  // Give sweeper a chance to keep up with CTW
1348 1348                  VM_ForceSafepoint op;
1349 1349                  VMThread::execute(&op);
1350 1350                  _codecache_sweep_counter = 0;
1351 1351                }
1352 1352                // Force compilation
1353      -              CompileBroker::compile_method(m, InvocationEntryBci, CompLevel_initial_compile,
     1353 +              CompileBroker::compile_method(m, InvocationEntryBci, CompilationPolicy::policy()->initial_compile_level(),
1354 1354                                              methodHandle(), 0, "CTW", THREAD);
1355 1355                if (HAS_PENDING_EXCEPTION) {
1356 1356                  clear_pending_exception_if_not_oom(CHECK);
1357 1357                  tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_counter, m->name()->as_C_string());
1358 1358                }
1359      -              if (TieredCompilation) {
     1359 +              if (TieredCompilation && TieredStopAtLevel >= CompLevel_full_optimization) {
1360 1360                  // Clobber the first compile and force second tier compilation
1361 1361                  nmethod* nm = m->code();
1362 1362                  if (nm != NULL) {
1363 1363                    // Throw out the code so that the code cache doesn't fill up
1364 1364                    nm->make_not_entrant();
1365 1365                    m->clear_code();
1366 1366                  }
1367 1367                  CompileBroker::compile_method(m, InvocationEntryBci, CompLevel_full_optimization,
1368 1368                                                methodHandle(), 0, "CTW", THREAD);
1369 1369                  if (HAS_PENDING_EXCEPTION) {
↓ open down ↓ 78 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX