Mercurial > hg > graal-jvmci-8
comparison src/share/vm/classfile/classLoader.cpp @ 1783:d5d065957597
6953144: Tiered compilation
Summary: Infrastructure for tiered compilation support (interpreter + c1 + c2) for 32 and 64 bit. Simple tiered policy implementation.
Reviewed-by: kvn, never, phh, twisti
author | iveresov |
---|---|
date | Fri, 03 Sep 2010 17:51:07 -0700 |
parents | 2a47bd84841f |
children | 2d26b0046e0d f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1782:f353275af40e | 1783:d5d065957597 |
---|---|
1290 tty->print_cr("CompileTheWorld (%d) : %s", _compile_the_world_counter, buffer); | 1290 tty->print_cr("CompileTheWorld (%d) : %s", _compile_the_world_counter, buffer); |
1291 // Preload all classes to get around uncommon traps | 1291 // Preload all classes to get around uncommon traps |
1292 // Iterate over all methods in class | 1292 // Iterate over all methods in class |
1293 for (int n = 0; n < k->methods()->length(); n++) { | 1293 for (int n = 0; n < k->methods()->length(); n++) { |
1294 methodHandle m (THREAD, methodOop(k->methods()->obj_at(n))); | 1294 methodHandle m (THREAD, methodOop(k->methods()->obj_at(n))); |
1295 if (CompilationPolicy::canBeCompiled(m)) { | 1295 if (CompilationPolicy::can_be_compiled(m)) { |
1296 | 1296 |
1297 if (++_codecache_sweep_counter == CompileTheWorldSafepointInterval) { | 1297 if (++_codecache_sweep_counter == CompileTheWorldSafepointInterval) { |
1298 // Give sweeper a chance to keep up with CTW | 1298 // Give sweeper a chance to keep up with CTW |
1299 VM_ForceSafepoint op; | 1299 VM_ForceSafepoint op; |
1300 VMThread::execute(&op); | 1300 VMThread::execute(&op); |
1301 _codecache_sweep_counter = 0; | 1301 _codecache_sweep_counter = 0; |
1302 } | 1302 } |
1303 // Force compilation | 1303 // Force compilation |
1304 CompileBroker::compile_method(m, InvocationEntryBci, | 1304 CompileBroker::compile_method(m, InvocationEntryBci, CompLevel_initial_compile, |
1305 methodHandle(), 0, "CTW", THREAD); | 1305 methodHandle(), 0, "CTW", THREAD); |
1306 if (HAS_PENDING_EXCEPTION) { | 1306 if (HAS_PENDING_EXCEPTION) { |
1307 CLEAR_PENDING_EXCEPTION; | 1307 CLEAR_PENDING_EXCEPTION; |
1308 tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_counter, m->name()->as_C_string()); | 1308 tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_counter, m->name()->as_C_string()); |
1309 } | 1309 } |
1313 if (nm != NULL) { | 1313 if (nm != NULL) { |
1314 // Throw out the code so that the code cache doesn't fill up | 1314 // Throw out the code so that the code cache doesn't fill up |
1315 nm->make_not_entrant(); | 1315 nm->make_not_entrant(); |
1316 m->clear_code(); | 1316 m->clear_code(); |
1317 } | 1317 } |
1318 CompileBroker::compile_method(m, InvocationEntryBci, | 1318 CompileBroker::compile_method(m, InvocationEntryBci, CompLevel_full_optimization, |
1319 methodHandle(), 0, "CTW", THREAD); | 1319 methodHandle(), 0, "CTW", THREAD); |
1320 if (HAS_PENDING_EXCEPTION) { | 1320 if (HAS_PENDING_EXCEPTION) { |
1321 CLEAR_PENDING_EXCEPTION; | 1321 CLEAR_PENDING_EXCEPTION; |
1322 tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_counter, m->name()->as_C_string()); | 1322 tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_counter, m->name()->as_C_string()); |
1323 } | 1323 } |