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 void
afterInstructionExecute
(Instruction instruction, Throwable exception) Invoked after an instruction was executed.default void
afterRootExecute
(Instruction leaveInstruction, Object returnValue, Throwable t) Invoked before an instruction is executed.default void
beforeInstructionExecute
(Instruction instruction) Invoked before an instruction is executed.default void
beforeRootExecute
(Instruction enterInstruction) Invoked before an instruction is executed.default void
onBytecodeStackTransition
(Instruction source, Instruction target) Invoked when a bytecode node performs an on-stack transition.default void
onInvalidateInstruction
(Instruction before, Instruction after) Invoked when an instruction is invalidated.default void
onQuicken
(Instruction before, Instruction after) Invoked when an instruction was quickened.default void
onQuickenOperand
(Instruction baseInstruction, int operandIndex, Instruction operandBefore, Instruction operandAfter) Invoked when an operand was quickened due to boxing elimination.default void
onSpecialize
(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
-