RFR (M): 7200001: failed C1 OSR compile doesn't get recompiled with C2
Christian Thalinger
christian.thalinger at oracle.com
Mon Sep 24 11:17:42 PDT 2012
On Sep 21, 2012, at 5:46 PM, Christian Thalinger <christian.thalinger at oracle.com> wrote:
>
> On Sep 21, 2012, at 3:47 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
>
>> Looks good. But we usually keep "if" check and it's body on separate lines for debugging purpose. You put them on one line in compileBroker.cpp and method.cpp.
>
> Ahh, debugging, right. I wanted to make it more compact but you have a good point. I'll undo that.
I put the body on separate lines again and updated the webrev.
-- Chris
>
> -- Chris
>
>>
>> Thanks,
>> Vladimir
>>
>> Christian Thalinger wrote:
>>> http://cr.openjdk.java.net/~twisti/7200001
>>> 7200001: failed C1 OSR compile doesn't get recompiled with C2
>>> Reviewed-by:
>>> When a C1 OSR compile bails out we don't recompile the method in C2 which it should:
>>> 3661 3 % 3 com.oracle.nashorn.scripts.Script$mult::bench @ 21 (143 bytes) COMPILE SKIPPED: unlinked call site (FIXME needs patching or recompile support) (retry at different tier)
>>> The problem is that we only have one flag that indicates a method is not OSR
>>> compilable:
>>> JVM_ACC_NOT_OSR_COMPILABLE = 0x08000000,
>>> Unlike for normal compiles where we have a flag for each compiler:
>>> JVM_ACC_NOT_C2_COMPILABLE = 0x02000000,
>>> JVM_ACC_NOT_C1_COMPILABLE = 0x04000000,
>>> The fix is to set not-OSR-compilable for the current compile level and not any level. Since this problem occurs very rarely as C1 usually can compile all methods
>>> we set a method not-C1-compilable when it's not-C1-OSR-compilable:
>>> void set_not_c1_osr_compilable() { set_not_c1_compilable(); }
>>> and wait for C2 to compile it.
>>> If this shows a problem in the future we can sacrifice another bit in the flags.
>>> src/share/vm/compiler/compileBroker.cpp
>>> src/share/vm/compiler/compileBroker.hpp
>>> src/share/vm/compiler/compileLog.cpp
>>> src/share/vm/oops/method.cpp
>>> src/share/vm/oops/method.hpp
>>> src/share/vm/runtime/advancedThresholdPolicy.cpp
>>> src/share/vm/runtime/compilationPolicy.cpp
>>> src/share/vm/runtime/simpleThresholdPolicy.cpp
>>> src/share/vm/runtime/vmStructs.cpp
>>> src/share/vm/utilities/accessFlags.hpp
>
More information about the hotspot-compiler-dev
mailing list