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 3 times, most recently from 96f965e to 63c58ea Compare November 3, 2025 12:19
…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 changed the title [GR-51945][GR-71030][GR-71031] Add BytecodeDescriptor; Add InstructionTracer [GR-51945] [GR-71030] [GR-71031] Add BytecodeDescriptor; Add InstructionTracer. Nov 3, 2025
@graalvmbot graalvmbot changed the title [GR-51945] [GR-71030] [GR-71031] Add BytecodeDescriptor; Add InstructionTracer. [GR-51945][GR-71030][GR-71031] Add BytecodeDescriptor; Add InstructionTracer. Nov 3, 2025
@graalvmbot graalvmbot changed the title [GR-51945][GR-71030][GR-71031] Add BytecodeDescriptor; Add InstructionTracer. [GR-51945] [GR-71030] [GR-71031] Add BytecodeDescriptor. Add InstructionTracer. Nov 3, 2025
@graalvmbot graalvmbot force-pushed the chumer/GR-51945/instruction-tracing branch from 63c58ea to 75c5ea6 Compare November 3, 2025 15:38
@graalvmbot graalvmbot merged commit 2abb822 into master Nov 4, 2025
13 checks passed
@graalvmbot graalvmbot deleted the chumer/GR-51945/instruction-tracing branch November 4, 2025 17:54
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