Skip to content

Developer Tooling & Engine Observability #4937

@kingsmen732

Description

@kingsmen732

From understanding what is the current issue:

  • print statements and ad-hoc eprintln! calls are the only debugging mechanism today.No structured VM logging
  • there is no way to capture a chronological record of bytecode execution, GC events, or scope resolution without modifying source and recompiling.No opt-in tracing
  • allocation counts, GC pause durations, bytecode histogram data, and similar statistics are not collected or exposed
  • the existing docs do not explain how to use debug builds, enable verbose output, or interpret engine internals

Rough idea on what to be done

  • Logging — structured, levelled messages at key execution points
  • Tracing — a step-by-step record of what the engine did and when
  • Metrics — hard numbers: allocations, GC pauses, bytecode frequency

What we could be actually incorporating to make this work

  • Replace ad-hoc debug output with structured, levelled log calls
  • Add a DebugVM wrapper around the main interpreter loop that, when enabled via a builder option or environment variable (BOA_TRACE=1), emits per-instruction trace events
  • Maybe introduce a lightweight BoaMetrics struct (hidden behind the metrics Cargo feature) that accumulates counters and histograms during execution
    -Mainly start making debugging.md and rustdocs examples to every public metrics type and how to attach the logs

this currently aligns close to #2736 , we can try to start creating a first level implementation so later it will be helpful to start with what parameters needs to be traced and logged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions