RVM

Assertion failure in inline oracle

Details

  • Number of attachments :
    0

Description

http://jikesrvm.anu.edu.au/cattrack/results/rvmx86lnx32b.anu.edu.au/sanity.1421/FullAdaptiveGenCopy/default/dacapo/bloat/default/Output.txt

===== DaCapo bloat starting =====
vm internal error at:

– Stack –
at [0x67ae7524] Lorg/jikesrvm/VM; _assertionFailure(Ljava/lang/String;Ljava/lang/String;)V at line 535
at [0x67ae75c4] Lorg/jikesrvm/VM; _assert(ZLjava/lang/String;Ljava/lang/String;)V at line 518
at [0x67ae75c4] Lorg/jikesrvm/VM; _assert(Z)V at line 496
at [0x67ae75c4] Lorg/jikesrvm/compilers/opt/OPT_DefaultInlineOracle; shouldInline(Lorg/jikesrvm/compilers/opt/ir/OPT_CompilationState;)Lorg/jikesrvm/compilers/opt/OPT_InlineDecision; at line 390
at [0x67ae7608] Lorg/jikesrvm/compilers/opt/ir/OPT_BC2IR; shouldInline(Lorg/jikesrvm/compilers/opt/ir/OPT_Instruction;Z)Lorg/jikesrvm/compilers/opt/OPT_InlineDecision; at line 4471
at [0x67ae76b4] Lorg/jikesrvm/compilers/opt/ir/OPT_BC2IR; generateFrom(I)V at line 1794
at [0x67ae76e8] Lorg/jikesrvm/compilers/opt/ir/OPT_BC2IR; generateHIR()V at line 314
at [0x67ae7794] Lorg/jikesrvm/compilers/opt/ir/OPT_BC2IR; generateHIR(Lorg/jikesrvm/compilers/opt/ir/OPT_GenerationContext;)V at line 112
at [0x67ae7794] Lorg/jikesrvm/compilers/opt/ir/OPT_Inliner; execute(Lorg/jikesrvm/compilers/opt/OPT_InlineDecision;Lorg/jikesrvm/compilers/opt/ir/OPT_GenerationContext;Lorg/jikesrvm/compilers/opt/ir/OPT_ExceptionHandlerBasicBlockBag;Lorg/jikesrvm/compilers/opt/ir/OPT_Instruction;)Lorg/jikesrvm/compilers/opt/ir/OPT_GenerationContext; at line 423
at [0x67ae77ec] Lorg/jikesrvm/compilers/opt/ir/OPT_BC2IR; maybeInlineMethod(Lorg/jikesrvm/compilers/opt/OPT_InlineDecision;Lorg/jikesrvm/compilers/opt/ir/OPT_Instruction;)Z at line 4514
at [0x67ae7898] Lorg/jikesrvm/compilers/opt/ir/OPT_BC2IR; generateFrom(I)V at line 1794
at [0x67ae78cc] Lorg/jikesrvm/compilers/opt/ir/OPT_BC2IR; generateHIR()V at line 299
at [0x67ae7978] Lorg/jikesrvm/compilers/opt/ir/OPT_BC2IR; generateHIR(Lorg/jikesrvm/compilers/opt/ir/OPT_GenerationContext;)V at line 112
at [0x67ae7978] Lorg/jikesrvm/compilers/opt/ir/OPT_Inliner; execute(Lorg/jikesrvm/compilers/opt/OPT_InlineDecision;Lorg/jikesrvm/compilers/opt/ir/OPT_GenerationContext;Lorg/jikesrvm/compilers/opt/ir/OPT_ExceptionHandlerBasicBlockBag;Lorg/jikesrvm/compilers/opt/ir/OPT_Instruction;)Lorg/jikesrvm/compilers/opt/ir/OPT_GenerationContext; at line 152
at [0x67ae79d0] Lorg/jikesrvm/compilers/opt/ir/OPT_BC2IR; maybeInlineMethod(Lorg/jikesrvm/compilers/opt/OPT_InlineDecision;Lorg/jikesrvm/compilers/opt/ir/OPT_Instruction;)Z at line 4514
at [0x67ae7a7c] Lorg/jikesrvm/compilers/opt/ir/OPT_BC2IR; generateFrom(I)V at line 1794
at [0x67ae7ab0] Lorg/jikesrvm/compilers/opt/ir/OPT_BC2IR; generateHIR()V at line 299
at [0x67ae7b5c] Lorg/jikesrvm/compilers/opt/ir/OPT_BC2IR; generateHIR(Lorg/jikesrvm/compilers/opt/ir/OPT_GenerationContext;)V at line 112
at [0x67ae7b5c] Lorg/jikesrvm/compilers/opt/ir/OPT_Inliner; execute(Lorg/jikesrvm/compilers/opt/OPT_InlineDecision;Lorg/jikesrvm/compilers/opt/ir/OPT_GenerationContext;Lorg/jikesrvm/compilers/opt/ir/OPT_ExceptionHandlerBasicBlockBag;Lorg/jikesrvm/compilers/opt/ir/OPT_Instruction;)Lorg/jikesrvm/compilers/opt/ir/OPT_GenerationContext; at line 152
at [0x67ae7bb4] Lorg/jikesrvm/compilers/opt/ir/OPT_BC2IR; maybeInlineMethod(Lorg/jikesrvm/compilers/opt/OPT_InlineDecision;Lorg/jikesrvm/compilers/opt/ir/OPT_Instruction;)Z at line 4514
at [0x67ae7c60] Lorg/jikesrvm/compilers/opt/ir/OPT_BC2IR; generateFrom(I)V at line 1794
at [0x67ae7c94] Lorg/jikesrvm/compilers/opt/ir/OPT_BC2IR; generateHIR()V at line 299
at [0x67ae7cd4] Lorg/jikesrvm/compilers/opt/ir/OPT_BC2IR; generateHIR(Lorg/jikesrvm/compilers/opt/ir/OPT_GenerationContext;)V at line 112
at [0x67ae7cd4] Lorg/jikesrvm/compilers/opt/ir/OPT_ConvertBCtoHIR; perform(Lorg/jikesrvm/compilers/opt/ir/OPT_IR;)V at line 34
at [0x67ae7d38] Lorg/jikesrvm/compilers/opt/OPT_CompilerPhase; performPhase(Lorg/jikesrvm/compilers/opt/ir/OPT_IR;)V at line 202
at [0x67ae7d94] Lorg/jikesrvm/compilers/opt/OPT_OptimizationPlanAtomicElement; perform(Lorg/jikesrvm/compilers/opt/ir/OPT_IR;)V at line 88
at [0x67ae7df8] Lorg/jikesrvm/compilers/opt/OPT_OptimizationPlanCompositeElement; perform(Lorg/jikesrvm/compilers/opt/ir/OPT_IR;)V at line 141
at [0x67ae7e3c] Lorg/jikesrvm/compilers/opt/OPT_CompilationPlan; execute()Lorg/jikesrvm/compilers/opt/ir/OPT_IR; at line 128
at [0x67ae7e6c] Lorg/jikesrvm/compilers/opt/OPT_Compiler; compile(Lorg/jikesrvm/compilers/opt/OPT_CompilationPlan;)Lorg/jikesrvm/compilers/common/VM_CompiledMethod; at line 219
at [0x67ae7ec8] Lorg/jikesrvm/compilers/common/VM_RuntimeCompiler; optCompile(Lorg/jikesrvm/classloader/VM_NormalMethod;Lorg/jikesrvm/compilers/opt/OPT_CompilationPlan;)Lorg/jikesrvm/compilers/common/VM_CompiledMethod; at line 358
at [0x67ae7f44] Lorg/jikesrvm/compilers/common/VM_RuntimeCompiler; recompileWithOpt(Lorg/jikesrvm/compilers/opt/OPT_CompilationPlan;)I at line 537
at [0x67ae7fbc] Lorg/jikesrvm/adaptive/controller/VM_ControllerPlan; doRecompile()Lorg/jikesrvm/compilers/common/VM_CompiledMethod; at line 179
at [0x67ae7fd8] Lorg/jikesrvm/adaptive/recompilation/VM_CompilationThread; run()V at line 53
at [0x67ae8000] Lorg/jikesrvm/scheduler/VM_Thread; startoff()V at line 611

Issue Links

Activity

Hide
David Grove added a comment -

great, thanks Peter!

Show
David Grove added a comment - great, thanks Peter!
Hide
David Grove added a comment -

===== DaCapo bloat starting =====
Error, inlining for 2 targets
Inlining into < SystemAppCL, LEDU/purdue/cs/bloat/tree/Tree$StmtList; >.iterator ()Ljava/util/Iterator; at bytecode index 1
Method: < SystemAppCL, LEDU/purdue/cs/bloat/tree/Tree$StmtList; >.listIterator ()Ljava/util/ListIterator; doesn't need a guard
Method 0: < BootstrapCL, Ljava/util/AbstractList; >.listIterator ()Ljava/util/ListIterator;
NeedsGuard: true
Method 1: < SystemAppCL, LEDU/purdue/cs/bloat/tree/Tree$StmtList; >.listIterator ()Ljava/util/ListIterator;
NeedsGuard: false
vm internal error at:

– Stack –
at [0x716f5934] Lorg/jikesrvm/VM; _assertionFailure(Ljava/lang/String;Ljava/lang/String;)V at line 547
at [0x716f59dc] Lorg/jikesrvm/VM; _assert(ZLjava/lang/String;Ljava/lang/String;)V at line 530
at [0x716f59dc] Lorg/jikesrvm/VM; _assert(Z)V at line 508
at [0x716f59dc] Lorg/jikesrvm/compilers/opt/inlining/DefaultInlineOracle; shouldInline(Lorg/jikesrvm/compilers/opt/inlining/CompilationState;)Lorg/jikesrvm/compilers/opt/inlining/InlineDecision; at line 410
at [0x716f5a20] Lorg/jikesrvm/compilers/opt/bc2ir/BC2IR; shouldInline(Lorg/jikesrvm/compilers/opt/ir/Instruction;Z)Lorg/jikesrvm/compilers/opt/inlining/InlineDecision; at line 4586
at [0x716f5acc] Lorg/jikesrvm/compilers/opt/bc2ir/BC2IR; generateFrom(I)V at line 1880
at [0x716f5b00] Lorg/jikesrvm/compilers/opt/bc2ir/BC2IR; generateHIR()V at line 364
at [0x716f5b9c] Lorg/jikesrvm/compilers/opt/bc2ir/BC2IR; generateHIR(Lorg/jikesrvm/compilers/opt/bc2ir/GenerationContext;)V at line 177
at [0x716f5b9c] Lorg/jikesrvm/compilers/opt/inlining/Inliner; execute(Lorg/jikesrvm/compilers/opt/inlining/InlineDecision;Lorg/jikesrvm/compilers/opt/bc2ir/GenerationContext;Lorg/jikesrvm/compilers/opt/ir/ExceptionHandlerBasicBlockBag;Lorg/jikesrvm/compilers/opt/ir/Instruction;)Lorg/jikesrvm/compilers/opt/bc2ir/GenerationContext; at line 449
at [0x716f5bf4] Lorg/jikesrvm/compilers/opt/bc2ir/BC2IR; maybeInlineMethod(Lorg/jikesrvm/compilers/opt/inlining/InlineDecision;Lorg/jikesrvm/compilers/opt/ir/Instruction;)Z at line 4629
at [0x716f5ca0] Lorg/jikesrvm/compilers/opt/bc2ir/BC2IR; generateFrom(I)V at line 1927
at [0x716f5cd4] Lorg/jikesrvm/compilers/opt/bc2ir/BC2IR; generateHIR()V at line 364
at [0x716f5d14] Lorg/jikesrvm/compilers/opt/bc2ir/BC2IR; generateHIR(Lorg/jikesrvm/compilers/opt/bc2ir/GenerationContext;)V at line 177
at [0x716f5d14] Lorg/jikesrvm/compilers/opt/bc2ir/ConvertBCtoHIR; perform(Lorg/jikesrvm/compilers/opt/ir/IR;)V at line 36
at [0x716f5d68] Lorg/jikesrvm/compilers/opt/driver/CompilerPhase; performPhase(Lorg/jikesrvm/compilers/opt/ir/IR;)V at line 205
at [0x716f5dc4] Lorg/jikesrvm/compilers/opt/driver/OptimizationPlanAtomicElement; perform(Lorg/jikesrvm/compilers/opt/ir/IR;)V at line 89
at [0x716f5e18] Lorg/jikesrvm/compilers/opt/driver/OptimizationPlanCompositeElement; perform(Lorg/jikesrvm/compilers/opt/ir/IR;)V at line 143
at [0x716f5e64] Lorg/jikesrvm/compilers/opt/driver/CompilationPlan; execute()Lorg/jikesrvm/compilers/opt/ir/IR; at line 131
at [0x716f5e8c] Lorg/jikesrvm/compilers/opt/driver/OptimizingCompiler; compile(Lorg/jikesrvm/compilers/opt/driver/CompilationPlan;)Lorg/jikesrvm/compilers/common/VM_CompiledMethod; at line 224
at [0x716f5ee8] Lorg/jikesrvm/compilers/common/VM_RuntimeCompiler; optCompile(Lorg/jikesrvm/classloader/VM_NormalMethod;Lorg/jikesrvm/compilers/opt/driver/CompilationPlan;)Lorg/jikesrvm/compilers/common/VM_CompiledMethod; at line 358
at [0x716f5f58] Lorg/jikesrvm/compilers/common/VM_RuntimeCompiler; recompileWithOpt(Lorg/jikesrvm/compilers/opt/driver/CompilationPlan;)I at line 537
at [0x716f5fbc] Lorg/jikesrvm/adaptive/controller/VM_ControllerPlan; doRecompile()Lorg/jikesrvm/compilers/common/VM_CompiledMethod; at line 179
at [0x716f5fd8] Lorg/jikesrvm/adaptive/recompilation/VM_CompilationThread; run()V at line 53
at [0x716f6000] Lorg/jikesrvm/scheduler/VM_Thread; startoff()V at line 617

Show
David Grove added a comment - ===== DaCapo bloat starting ===== Error, inlining for 2 targets Inlining into < SystemAppCL, LEDU/purdue/cs/bloat/tree/Tree$StmtList; >.iterator ()Ljava/util/Iterator; at bytecode index 1 Method: < SystemAppCL, LEDU/purdue/cs/bloat/tree/Tree$StmtList; >.listIterator ()Ljava/util/ListIterator; doesn't need a guard Method 0: < BootstrapCL, Ljava/util/AbstractList; >.listIterator ()Ljava/util/ListIterator; NeedsGuard: true Method 1: < SystemAppCL, LEDU/purdue/cs/bloat/tree/Tree$StmtList; >.listIterator ()Ljava/util/ListIterator; NeedsGuard: false vm internal error at: – Stack – at [0x716f5934] Lorg/jikesrvm/VM; _assertionFailure(Ljava/lang/String;Ljava/lang/String;)V at line 547 at [0x716f59dc] Lorg/jikesrvm/VM; _assert(ZLjava/lang/String;Ljava/lang/String;)V at line 530 at [0x716f59dc] Lorg/jikesrvm/VM; _assert(Z)V at line 508 at [0x716f59dc] Lorg/jikesrvm/compilers/opt/inlining/DefaultInlineOracle; shouldInline(Lorg/jikesrvm/compilers/opt/inlining/CompilationState;)Lorg/jikesrvm/compilers/opt/inlining/InlineDecision; at line 410 at [0x716f5a20] Lorg/jikesrvm/compilers/opt/bc2ir/BC2IR; shouldInline(Lorg/jikesrvm/compilers/opt/ir/Instruction;Z)Lorg/jikesrvm/compilers/opt/inlining/InlineDecision; at line 4586 at [0x716f5acc] Lorg/jikesrvm/compilers/opt/bc2ir/BC2IR; generateFrom(I)V at line 1880 at [0x716f5b00] Lorg/jikesrvm/compilers/opt/bc2ir/BC2IR; generateHIR()V at line 364 at [0x716f5b9c] Lorg/jikesrvm/compilers/opt/bc2ir/BC2IR; generateHIR(Lorg/jikesrvm/compilers/opt/bc2ir/GenerationContext;)V at line 177 at [0x716f5b9c] Lorg/jikesrvm/compilers/opt/inlining/Inliner; execute(Lorg/jikesrvm/compilers/opt/inlining/InlineDecision;Lorg/jikesrvm/compilers/opt/bc2ir/GenerationContext;Lorg/jikesrvm/compilers/opt/ir/ExceptionHandlerBasicBlockBag;Lorg/jikesrvm/compilers/opt/ir/Instruction;)Lorg/jikesrvm/compilers/opt/bc2ir/GenerationContext; at line 449 at [0x716f5bf4] Lorg/jikesrvm/compilers/opt/bc2ir/BC2IR; maybeInlineMethod(Lorg/jikesrvm/compilers/opt/inlining/InlineDecision;Lorg/jikesrvm/compilers/opt/ir/Instruction;)Z at line 4629 at [0x716f5ca0] Lorg/jikesrvm/compilers/opt/bc2ir/BC2IR; generateFrom(I)V at line 1927 at [0x716f5cd4] Lorg/jikesrvm/compilers/opt/bc2ir/BC2IR; generateHIR()V at line 364 at [0x716f5d14] Lorg/jikesrvm/compilers/opt/bc2ir/BC2IR; generateHIR(Lorg/jikesrvm/compilers/opt/bc2ir/GenerationContext;)V at line 177 at [0x716f5d14] Lorg/jikesrvm/compilers/opt/bc2ir/ConvertBCtoHIR; perform(Lorg/jikesrvm/compilers/opt/ir/IR;)V at line 36 at [0x716f5d68] Lorg/jikesrvm/compilers/opt/driver/CompilerPhase; performPhase(Lorg/jikesrvm/compilers/opt/ir/IR;)V at line 205 at [0x716f5dc4] Lorg/jikesrvm/compilers/opt/driver/OptimizationPlanAtomicElement; perform(Lorg/jikesrvm/compilers/opt/ir/IR;)V at line 89 at [0x716f5e18] Lorg/jikesrvm/compilers/opt/driver/OptimizationPlanCompositeElement; perform(Lorg/jikesrvm/compilers/opt/ir/IR;)V at line 143 at [0x716f5e64] Lorg/jikesrvm/compilers/opt/driver/CompilationPlan; execute()Lorg/jikesrvm/compilers/opt/ir/IR; at line 131 at [0x716f5e8c] Lorg/jikesrvm/compilers/opt/driver/OptimizingCompiler; compile(Lorg/jikesrvm/compilers/opt/driver/CompilationPlan;)Lorg/jikesrvm/compilers/common/VM_CompiledMethod; at line 224 at [0x716f5ee8] Lorg/jikesrvm/compilers/common/VM_RuntimeCompiler; optCompile(Lorg/jikesrvm/classloader/VM_NormalMethod;Lorg/jikesrvm/compilers/opt/driver/CompilationPlan;)Lorg/jikesrvm/compilers/common/VM_CompiledMethod; at line 358 at [0x716f5f58] Lorg/jikesrvm/compilers/common/VM_RuntimeCompiler; recompileWithOpt(Lorg/jikesrvm/compilers/opt/driver/CompilationPlan;)I at line 537 at [0x716f5fbc] Lorg/jikesrvm/adaptive/controller/VM_ControllerPlan; doRecompile()Lorg/jikesrvm/compilers/common/VM_CompiledMethod; at line 179 at [0x716f5fd8] Lorg/jikesrvm/adaptive/recompilation/VM_CompilationThread; run()V at line 53 at [0x716f6000] Lorg/jikesrvm/scheduler/VM_Thread; startoff()V at line 617
Hide
Ian Rogers added a comment - - edited

Repeated here:
http://jikesrvm.anu.edu.au/cattrack/results/rvmx86lnx32b.anu.edu.au/sanity/4548/prototype-opt/default/dacapo/bloat/default/Output.txt
interesting the debug output generated is for a different inlining decision.

Show
Ian Rogers added a comment - - edited Repeated here: http://jikesrvm.anu.edu.au/cattrack/results/rvmx86lnx32b.anu.edu.au/sanity/4548/prototype-opt/default/dacapo/bloat/default/Output.txt interesting the debug output generated is for a different inlining decision.
Hide
Ian Rogers added a comment -
Show
Ian Rogers added a comment - This error also occurs in jython (and since closing a definite bug in the inliner in bug RVM-597): http://jikesrvm.anu.edu.au/cattrack/results/piccolo.watson.ibm.com/core-ppc64/4587/development/default/dacapo/jython/default/Output.txt
Hide
David Grove added a comment -

ok, the bug can be easily reproduced using an aosadvice file. I understand what is going wrong (blush...). We're not doing a good job of combining the static type information available at the callsite with the dynamic profile data. In particular, the code is only filtering the profile data by the static information when there we statically have a precise target (ie, we're doing the profile data lookup because the single statically resolved target is too big to inline, so we're looking to see if its hot to justify a larger space budget). We're missing the much more important case where we are going to need to do a guarded inline because the static narrowed callee is a virtual method of a non-final class. In the case where the callsite is actually in the superclass (where we called up from a subclass method) and is in turn invoking a method defined in the superclass, but overridden in the subclasses, we
should be able to do a nice method-test or pre-ex inlining, but aren't filtering the call-graph data back down to what we know statically, so we end up with the two targets in the assertion failed (one of which, the one which says it needs a guard, should have been eliminated because it is statically impossible given the information we have about the static type of the receiver).

Show
David Grove added a comment - ok, the bug can be easily reproduced using an aosadvice file. I understand what is going wrong (blush...). We're not doing a good job of combining the static type information available at the callsite with the dynamic profile data. In particular, the code is only filtering the profile data by the static information when there we statically have a precise target (ie, we're doing the profile data lookup because the single statically resolved target is too big to inline, so we're looking to see if its hot to justify a larger space budget). We're missing the much more important case where we are going to need to do a guarded inline because the static narrowed callee is a virtual method of a non-final class. In the case where the callsite is actually in the superclass (where we called up from a subclass method) and is in turn invoking a method defined in the superclass, but overridden in the subclasses, we should be able to do a nice method-test or pre-ex inlining, but aren't filtering the call-graph data back down to what we know statically, so we end up with the two targets in the assertion failed (one of which, the one which says it needs a guard, should have been eliminated because it is statically impossible given the information we have about the static type of the receiver).
Hide
David Grove added a comment -

fix committed in r14923.

Show
David Grove added a comment - fix committed in r14923.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: