Skip to content

Add SDK support for device memory inspection - #3184

Open
floitsch wants to merge 3 commits into
masterfrom
device-inspector-sdk-support
Open

Add SDK support for device memory inspection#3184
floitsch wants to merge 3 commits into
masterfrom
device-inspector-sdk-support

Conversation

@floitsch

@floitsch floitsch commented Aug 26, 2026

Copy link
Copy Markdown
Member

This extracts the SDK/runtime portion of the device-memory inspector work so the required SDK surface can be reviewed independently of the tool itself.

Included

  • source-level parameter names and local stack-slot lifetimes in snapshot debug metadata
  • an experimental privileged ESP32 terminal UART memory-dump primitive
  • optional stable VM-state transition checkpoints (TOIT_VM_STATE_CHECKPOINTS)
  • GC-metadata and Bluetooth allocator attribution
  • snapshot/memory-report decoding support for the new metadata and tags

Deliberately excluded

  • the inspector model, query API, server, and HTML viewer
  • UART/QEMU acquisition clients and capture fixtures
  • the GDB RSP package
  • the special capture boot image
  • build-time GDB/ELF extraction and inspector envelope entries

The last item should return as generic ELF/DWARF and envelope metadata support rather than make the SDK build import the inspector package.

This is 28 files, 1,357 insertions, and 44 deletions. The low-level ESP32 dump is isolated in device_memory_dump_esp32.cc; os_esp32.cc gains only three allocation-accounting lines. The changes are split into snapshot-metadata and ESP32-runtime commits.

RISC-V allocation tagging depends on #3183, which is intentionally a separate PR and can be merged independently.

Validation

  • host VM/CLI compilation reached the package-sync stage successfully (package sync itself is unavailable in the sandbox cache)
  • frame-debug snapshot decode test passed
  • frame-debug toitp presentation test passed
  • the split ESP32 dump, primitive, and os_esp32.cc translation units cross-compiled successfully
  • the renamed VM-state checkpoint implementation and all changed consumers compiled successfully
  • git diff --check passed

@floitsch
floitsch force-pushed the device-inspector-sdk-support branch from 16df2d7 to 9d6c183 Compare August 26, 2026 13:55
Keep the terminal UART dump in a dedicated device-memory source file. Add optional VM-state transition checkpoints and allocator tags for GC metadata and Bluetooth memory.
@floitsch
floitsch force-pushed the device-inspector-sdk-support branch from 9d6c183 to 6a89a8a Compare August 28, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant