Mercurial > hg > graal-compiler
comparison src/share/vm/compiler/compileBroker.cpp @ 12965:8b4bbba322d3
8026407: VM crashes on linux-ppc and linux-i586 when there is not enough ReservedCodeCacheSize specified
Summary: Ensure currently required generation of AdapterHandlerLibrary::create_native_wrapper()
Reviewed-by: roland, iveresov
author | anoll |
---|---|
date | Wed, 23 Oct 2013 10:00:39 +0200 |
parents | 469216acdb28 |
children | a196f1aaec86 |
comparison
equal
deleted
inserted
replaced
12964:36e17466dd39 | 12965:8b4bbba322d3 |
---|---|
1295 // a lock the compiling thread can not acquire. Prefetch it here. | 1295 // a lock the compiling thread can not acquire. Prefetch it here. |
1296 if (JvmtiExport::should_post_compiled_method_load()) { | 1296 if (JvmtiExport::should_post_compiled_method_load()) { |
1297 method->jmethod_id(); | 1297 method->jmethod_id(); |
1298 } | 1298 } |
1299 | 1299 |
1300 // If the compiler is shut off due to code cache getting full | |
1301 // fail out now so blocking compiles dont hang the java thread | |
1302 if (!should_compile_new_jobs()) { | |
1303 CompilationPolicy::policy()->delay_compilation(method()); | |
1304 return NULL; | |
1305 } | |
1306 | |
1307 // do the compilation | 1300 // do the compilation |
1308 if (method->is_native()) { | 1301 if (method->is_native()) { |
1309 if (!PreferInterpreterNativeStubs || method->is_method_handle_intrinsic()) { | 1302 if (!PreferInterpreterNativeStubs || method->is_method_handle_intrinsic()) { |
1310 // Acquire our lock. | 1303 // Acquire our lock. |
1311 int compile_id; | 1304 int compile_id; |
1312 { | 1305 { |
1313 MutexLocker locker(MethodCompileQueue_lock, THREAD); | 1306 MutexLocker locker(MethodCompileQueue_lock, THREAD); |
1314 compile_id = assign_compile_id(method, standard_entry_bci); | 1307 compile_id = assign_compile_id(method, standard_entry_bci); |
1315 } | 1308 } |
1309 // To properly handle the appendix argument for out-of-line calls we are using a small trampoline that | |
1310 // pops off the appendix argument and jumps to the target (see gen_special_dispatch in SharedRuntime). | |
1311 // | |
1312 // Since normal compiled-to-compiled calls are not able to handle such a thing we MUST generate an adapter | |
1313 // in this case. If we can't generate one and use it we can not execute the out-of-line method handle calls. | |
1316 (void) AdapterHandlerLibrary::create_native_wrapper(method, compile_id); | 1314 (void) AdapterHandlerLibrary::create_native_wrapper(method, compile_id); |
1317 } else { | 1315 } else { |
1318 return NULL; | 1316 return NULL; |
1319 } | 1317 } |
1320 } else { | 1318 } else { |
1319 // If the compiler is shut off due to code cache getting full | |
1320 // fail out now so blocking compiles dont hang the java thread | |
1321 if (!should_compile_new_jobs()) { | |
1322 CompilationPolicy::policy()->delay_compilation(method()); | |
1323 return NULL; | |
1324 } | |
1321 compile_method_base(method, osr_bci, comp_level, hot_method, hot_count, comment, THREAD); | 1325 compile_method_base(method, osr_bci, comp_level, hot_method, hot_count, comment, THREAD); |
1322 } | 1326 } |
1323 | 1327 |
1324 // return requested nmethod | 1328 // return requested nmethod |
1325 // We accept a higher level osr method | 1329 // We accept a higher level osr method |