Disable Java7 JIT for for some code

Disable JIT in Java7 for 1 Bytebuddy method. Hopefully this will help
with this error:

```
Stack: [0x00007f892f079000,0x00007f892f17a000],  sp=0x00007f892f174e30,  free space=1007k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x73db30]  PhaseIdealLoop::build_loop_late_post(Node*)+0x130
V  [libjvm.so+0x73e06b]  PhaseIdealLoop::build_loop_late(VectorSet&, Node_List&, Node_Stack&)+0x10b
V  [libjvm.so+0x745239]  PhaseIdealLoop::build_and_optimize(bool, bool)+0x899
V  [libjvm.so+0x4589b0]  Compile::Optimize()+0x8f0
V  [libjvm.so+0x459e87]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool)+0x10c7
V  [libjvm.so+0x3c9c5c]  C2Compiler::compile_method(ciEnv*, ciMethod*, int)+0xec
V  [libjvm.so+0x45f5bb]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x32b
V  [libjvm.so+0x460960]  CompileBroker::compiler_thread_loop()+0x440
V  [libjvm.so+0x9283ab]  JavaThread::thread_main_inner()+0xdb
V  [libjvm.so+0x928590]  JavaThread::run()+0x1d0
V  [libjvm.so+0x7f56e2]  java_start(Thread*)+0x122

Current CompileTask:
C2:   3653  733
net.bytebuddy.description.type.TypeDescription$Generic$Visitor$Substitutor::onParameterizedType (129
bytes)
```
This commit is contained in:
Nikolay Martynov 2019-02-04 14:36:07 -05:00
parent 6a950d4745
commit 6beade83ed
1 changed files with 6 additions and 0 deletions

View File

@ -235,6 +235,12 @@ for (def env : System.getenv().entrySet()) {
def newTask = task "${clonedTask.name}Java${javaName}Generated"(type: clonedTask.class) {
description "Runs $clonedTask.name under java ${javaName}"
executable = javaPath
if (javaName == "7") {
// Disable JIT for this method. Somtimes Java7 JVM crashes trying to compile it.
jvmArgs '-XX:CompileCommand=exclude,net.bytebuddy.description.type.TypeDescription$Generic$Visitor$Substitutor::onParameterizedType'
}
onlyIf { isJavaVersionAllowed(javaVersion) && isTestingEnabled(javaName) }
if (applyCodeCoverage) {
jacoco {