Database backend with global subexpression sharing #81
lukstafi
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
NOTE: this release doesn't support OCaml 5.4 nor Windows, because of the dependency on
nottyandnottui-unix. Hopefully we'll be able to relieve these constraints soon enough.This release brings a new, dynamic logging approach where debugging data is written to a DB by a debugged program, and separately rendered for exploration by the new
minidebug_viewbinary. Thanks to global (across a debugger runtime) sharing of common subexpressions ofsexpvalues, version 3.0 scales to much bigger logging loads, in particular when the sharing opportunity is exposed. Taking full benefit of this requires some work on / adaptation of the debugged program, because persistent data-structures in OCaml typically don't expose the underlying tree structure, and their defaultsexp_ofconversions serialize into flat lists.Disclaimer: Unlike any previous version, ppx_minidebug 3.0 is almost entirely "vibe coded".
From the changelog:
Added
minidebug_db.ml)minidebug_view db.db tui)/for multi-slot concurrent search (4 slots: S1-S4) with background Domainn/Njump to next/previous match with auto-expandQstops highlight propagation at matching ancestorsotoggles Ascending/Descending scope_idminidebug_view) for database inspectionstats: Database statistics and deduplication metricsshow: Render trace tree with configurable depth/formatcompact: Function names only view with timingsearch: CLI-based pattern searchexport: Export to markdown formatroots: Efficient top-level entry queries for large databasesChanged
entry_id→scope_id(identifies parent scope)header_entry_id→child_scope_id(points to child scope)show_entry_ids→show_scope_idsrun_idfrom composite keys (file versioning guarantees one run per file)Minidebug_runtime.debug_filetoMinidebug_db.debug_db_fileglobal_prefixparameter renamed torun_nameand stored in metadata databasefinish_and_cleanup()now optional (automatic at_exit handlers in Fast mode)values_first_modedefault changed totruefor better renderingFixed
no_debug_ifimplementation for database backend%log_entrydynamic scoping with database backendThis discussion was created from the release Database backend with global subexpression sharing.
All reactions