Architecture ยท observability
Shared tools across languages.
Debug across languages in one session. Profile guest code, inspect the shared heap, and diagnose JIT behavior, regardless of language.
Walkthrough
One common substrate
Elide brings Truffle's shared debugger, profiler and coverage tools to guest execution7 16. Each language implements a common instrumentation contract; Elide supplies shared configuration and reporting4 6 15. Native Image monitors and native profilers extend this diagnostic architecture into the managed runtime and machine code9 12.
One suite of consistent tools
Node provides an inspector, CPU profiles and heap snapshots for JavaScript23 24. Similarly, Elide connects each language to one instrumentation API for debugging, profiling and coverage14 16 17 19 20.
Uniform instrumentation
Truffle languages expose source locations and standard tags for operations such as calls and statements14 15. Their implementations determine which operations and source details each tool can see. Graal can inline instrument dispatch with guest code22.
Instrument from MCP or the CLI
Elide makes debugging, profiling, coverage and Insight available through CLI options1. The CLI sends these settings through a Cap'n Proto invocation record to engine components that activate the tools3 4 5. MCP exposes Insight through the same engine instrument API32.
Chrome Debugger works across languages
Step through cross-language calls, inspect variables and read guest stacks in one Chrome Debugger session17. Elide's CDP debugger option connects this shared debugger to guest execution2 18 30.
Insight works across languages
Insight lets a privileged script observe execution across languages21. Callbacks can inspect and modify guest locals22. See example below31.
Elide adds JFR events and bridges to Rust
Elide unifies logs under one configuration. JFR events describe boot, guest execution, and HTTP, on top of defaults. Policy connects these diagnostics to the program's lifecycle33 34 35.
Trace problems from source to runtime
Native Image supplies JFR execution samples and runtime events, plus managed-heap dumps that VisualVM can inspect10 11. Heap dumps expose the runtime's representation of guest objects. Linux perf samples native execution stacks; debug symbols and jitdump metadata identify ahead-of-time and runtime-compiled methods12.
- buildclosed world
- runactivate included tools
jfr ยท jvmstat ยท heapdump. Writes
.jfr and .hprof.Each instrument and its job
Choose a tool for its diagnostic scope. CPU sampling estimates where time goes; tracing counts executions19. Elide's bare --profiler selects tracing; --profiler=cpusampling selects sampling1 2.
Scroll to see all columns
| Instrument | CPU samples | Memory | Debugging | Coverage | Events | Inspection |
|---|---|---|---|---|---|---|
Chrome inspector--debugger17 18 | โ | |||||
DAP--debugger=dap18 | โ | |||||
CPU sampler--profiler=cpusampling19 | โ | |||||
CPU tracer--profiler=cputracing19 | โ | |||||
Memory tracer ยท experimental--profiler=memtracing19 | โ | |||||
Coverage--coverage20 | โ | |||||
Insight--insights=script21 | โ | |||||
Flight recorder.jfr recording10 | โ | โ | ||||
Heap dump.hprof configured trigger11 | โ | |||||
jvmstatprocess discovery9 13 | โ | |||||
Compilation trace-X polyglot.engine.TraceCompilation=true27 29 | โ | |||||
Ideal Graph Visualizercompiler graph dumps26 27 | โ | |||||
perf + jitdumpperf record12 | โ | |||||
VisualVMattach, or open .jfr / .hprof13 | โ | โ | โ |
Managed-runtime inspection in VisualVM
VisualVM opens recordings and managed-heap dumps to reveal runtime activity and objects retaining memory. Live inspection requires the corresponding monitoring support. These screenshots show upstream examples13.
Compiler graphs in IGV
IGV exposes Truffle trees, guest call graphs and compiler phases, connecting source structure to optimization decisions26 27. Elide exposes compilation tracing through -X; compiler graph dumps are configured separately28 29. These screenshots show upstream examples26.
One Insight agent, two languages
Save these three files together. The agent observes source loading; the two targets each print a result31.
observe.js
insight.on("source", (source) => {
if (source.name === "target.js" || source.name === "target.py") {
console.log(`Observed source: ${source.name}`);
}
});target.js
function twice(value) {
return value * 2;
}
console.log(`Result: ${twice(21)}`);target.py
def twice(value):
return value * 2
print("Result: " + str(twice(21)))Run each target with the same agent. Captured on macOS ARM64, 2026-09-05, with Elide 1.5.0+20260902.bac3ab38; both commands exited successfully with empty stderr31.
$ elide run --insights=observe.js target.js
Observed source: target.js
Result: 42
$ elide run --insights=observe.js target.py
Observed source: target.py
Result: 42Sources
- Elide CLI instruments โ Debugger, profiler, coverage and Insight options; bare profiler selects execution tracing.
- Elide instrument modes โ CDP and DAP debugging; CPU sampling, execution tracing and memory tracing.
- Elide invocation protocol โ Passing instrument settings from the CLI to the engine.
- Elide instrument configuration โ Shared instrument activation across guest languages.
- Elide Insight integration โ Agent registration and supported script formats.
- Elide profiler and coverage reporting โ Shared activation and collection with tool-specific reports.
- Elide tooling dependencies โ Chrome inspector, DAP, coverage, Insight and profilers.
- Elide native profiling configuration โ Frame pointers for native stack walking.
- Native Image monitoring options โ Build-time support for runtime monitoring.
- Native Image Flight Recorder โ Execution samples, runtime events and custom events.
- Elide managed-heap dumps โ
--heap-dumpon exit and--heap-dump-on-oom; dumps cover the managed VM heap and open in VisualVM. - Elide JIT profiling with perf โ
--jitdumpwrites runtime-compilation metadata;perf record,perf injectandperf reportresolve ahead-of-time and runtime-compiled guest code. - VisualVM โ Process discovery, JFR recordings and managed-heap inspection. Gallery images come from this guide.
- Truffle standard tags โ Common execution tags for calls, statements and other language operations.
- Truffle instrumentable nodes โ Source locations, tags and execution wrappers.
- Truffle instrumentation โ Shared hooks for observing execution and injecting behavior.
- Chrome Debugger โ Guest-language debugging, including stepping across language boundaries.
- Elide debugging guide โ
--debugger=dapand--debugger=cdpbind to loopback by default; DAP waits for a client before guest code runs. - Truffle profiling โ CPU sampling, execution tracing and experimental guest-allocation tracing.
- Truffle coverage โ Code coverage and LCOV reports.
- GraalVM Insight โ Writing scripts that instrument execution across languages.
- Insight execution hooks โ Observing execution and accessing guest locals; agent scripts run with operator privileges.
- Node.js CLI โ JavaScript profiling, heap snapshots and inspector options.
- Node.js inspector โ Chrome DevTools Protocol integration.
- Elide live capture โ Linux and macOS builds include jcmd, JFR, jvmstat and heap dumps; JMX and native memory tracking stay disabled.
- Ideal Graph Visualizer โ Compiler graphs, source metadata and compilation phases. Gallery images come from this guide.
- Truffle compiler diagnostics โ Compilation traces, syntax trees, guest call graphs and compiler phases.
- Native Image compiler options โ Build-time and runtime compiler configuration.
- Elide engine options โ Passing compilation-tracing options through the CLI.
- Elide debugger integration โ CDP and DAP connections; debugger access includes host resources.
- Insight example โ One agent observing source loading in JavaScript and Python, with scripts and recorded output.
- Elide MCP instruments โ Activating Insight through the engine API from MCP.
- Elide JFR events โ Boot, guest execution and HTTP events with timing and outcomes.
- Elide diagnostic lifecycle โ Capture controls and finalization before engine teardown.
- Elide unified logging โ JVM library logs flow into the Rust logging backend under a shared configuration.