Mercurial > hg > graal-compiler
diff src/share/vm/graal/graalRuntime.cpp @ 9338:0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
replaced NewArraySlowStubCall with NewArrayRuntimeCall using this support
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 26 Apr 2013 18:36:41 +0200 |
parents | bb2447c64055 |
children | 3e7d22d31f7e |
line wrap: on
line diff
--- a/src/share/vm/graal/graalRuntime.cpp Fri Apr 26 18:21:10 2013 +0200 +++ b/src/share/vm/graal/graalRuntime.cpp Fri Apr 26 18:36:41 2013 +0200 @@ -260,11 +260,16 @@ // This is pretty rare but this runtime patch is stressful to deoptimization // if we deoptimize here so force a deopt to stress the path. if (DeoptimizeALot) { - deopt_caller(); + static int deopts = 0; + // Alternate between deoptimizing and raising an error (which will also cause a deopt) + if (deopts++ % 2 == 0) { + ResourceMark rm(THREAD); + THROW(vmSymbols::java_lang_OutOfMemoryError()); + } else { + deopt_caller(); + } } - JRT_END - - +JRT_END JRT_ENTRY(void, GraalRuntime::new_multi_array(JavaThread* thread, Klass* klass, int rank, jint* dims)) assert(klass->is_klass(), "not a class");