-
-
Notifications
You must be signed in to change notification settings - Fork 618
Developer Tooling & Engine Observability #4937
Copy link
Copy link
Open
Labels
A-EnhancementNew feature or requestNew feature or request
Description
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
DebugVMwrapper 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
BoaMetricsstruct (hidden behind themetricsCargo 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-EnhancementNew feature or requestNew feature or request