Skip to content

Conversation

@graalvmbot
Copy link
Collaborator

  • GR-71030: Bytecode DSL now generates a new MyBytecodeRootNodeGen.Bytecode class that can be accessed via the MyBytecodeRootNodeGen.BYTECODE singleton. This new class allows you to parse, serialize, deserialize, and bytecode nodes in addition to the already existing static methods in the generated code.
  • GR-71030: Bytecode DSL now provides an InstructionDescriptor generated implementation for the bytecode interpreter. The instructions can be accessed via the new BytecodeDescriptor like this: MyBytecodeRootNodeGen.BYTECODE.getInstructionDescriptors(). There is also MyBytecodeRootNodeGen.BYTECODE.dump() to produce a human-readable instruction format.
  • GR-71031: Added new method BytecodeDescriptor.update(MyLanguage, BytecodeConfig) to update the bytecode config for all current and root nodes created in the future of a language.
  • GR-51945: Bytecode DSL, added InstructionTracer with onInstructionEnter(InstructionAccess, BytecodeNode, int, Frame). Tracers can be attached per root via BytecodeRootNodes.addInstructionTracer(InstructionTracer) and per descriptor via BytecodeDescriptor.addInstructionTracer(TruffleLanguage, InstructionTracer). Attaching a tracer invalidates affected roots and may trigger reparse and comes at a significant cost.
  • GR-51945: Bytecode DSL: added instruction tracer reference implementations PrintInstructionTracer and InstructionHistogramTracer. These are intended for diagnostics.
  • GR-51945: Added option engine.TraceBytecode to enable printing each executed Bytecode DSL instruction. Use the engine.BytecodeMethodFilter option to print instructions only for a given method.
  • GR-51945: Added option engine.BytecodeHistogram to enable printing a bytecode histogram on engine close. Use engine.BytecodeHistogramInterval to configure the interval at which the histogram is reset and printed.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 28, 2025
@graalvmbot graalvmbot force-pushed the chumer/GR-51945/instruction-tracing branch from 0b8b604 to f26f0e0 Compare October 28, 2025 12:20
…s parsing, (de)serialization, and instruction introspection; added instruction-level dynamic tracing via InstructionTracer and engine options engine.TraceBytecode, engine.BytecodeHistogram; added BytecodeDescriptor.update(Language, BytecodeConfig) to apply bytecode configuration (e.g. instrumentation, source info) to all existing and future roots for a language.
@graalvmbot graalvmbot force-pushed the chumer/GR-51945/instruction-tracing branch from f26f0e0 to 4ee99bb Compare October 28, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants