Interface BytecodeDebugListener
- All Known Subinterfaces:
BytecodeDebugTraceListener
public interface BytecodeDebugListener
Base interface for a bytecode root node to get additional debug event that are normally not
available. Useful for testing and debugging.
Warning: Do not deploy with implementing this listener in production. It causes severe performance degradation.
The debug listener can also be explicitly disabled by setting
GenerateBytecode.enableBytecodeDebugListener() to false .
- Since:
- 24.2
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidafterInstructionExecute(Instruction instruction, Throwable exception) Invoked after an instruction was executed.default voidafterRootExecute(Instruction leaveInstruction, Object returnValue, Throwable t) Invoked before an instruction is executed.default voidbeforeInstructionExecute(Instruction instruction) Invoked before an instruction is executed.default voidbeforeRootExecute(Instruction enterInstruction) Invoked before an instruction is executed.default voidonBytecodeStackTransition(Instruction source, Instruction target) Invoked when a bytecode node performs an on-stack transition.default voidonInvalidateInstruction(Instruction before, Instruction after) Invoked when an instruction is invalidated.default voidonQuicken(Instruction before, Instruction after) Invoked when an instruction was quickened.default voidonQuickenOperand(Instruction baseInstruction, int operandIndex, Instruction operandBefore, Instruction operandAfter) Invoked when an operand was quickened due to boxing elimination.default voidonSpecialize(Instruction instruction, String specialization) Invoked when an operation or instrumentation specializes itself.
-
Method Details
-
beforeRootExecute
Invoked before an instruction is executed. This has a very significant performance cost. Only override this method temporarily for debugging. This method may be called on partial evaluated code paths.- Since:
- 24.2
-
afterRootExecute
Invoked before an instruction is executed. This has a very significant performance cost. Only override this method temporarily for debugging. This method may be called on partial evaluated code paths.- Since:
- 24.2
-
beforeInstructionExecute
Invoked before an instruction is executed. This has a very significant performance cost. Only override this method temporarily for debugging. This method may be called on partial evaluated code paths.- Since:
- 24.2
-
afterInstructionExecute
Invoked after an instruction was executed. This has a very significant performance cost. Only override this method temporarily for debugging. This method may be called on partial evaluated code paths.- Since:
- 24.2
-
onSpecialize
Invoked when an operation or instrumentation specializes itself.- Since:
- 24.2
-
onBytecodeStackTransition
Invoked when a bytecode node performs an on-stack transition. On stack transitions may happen if additional bytecode or tag instrumentations are applied during execution while the current method is on-stack.- Since:
- 24.2
-
onInvalidateInstruction
Invoked when an instruction is invalidated. Instructions are invalidated to make bytecode nodes leave the current bytecode loop and update its own bytecodes.- Since:
- 24.2
-
onQuicken
Invoked when an instruction was quickened.- Since:
- 24.2
-
onQuickenOperand
default void onQuickenOperand(Instruction baseInstruction, int operandIndex, Instruction operandBefore, Instruction operandAfter) Invoked when an operand was quickened due to boxing elimination.- Since:
- 24.2
-