Skip to main content

Module dump

Module dump 

Source
Expand description

Heap dump module for rune. After a successful bootstrap in which elisp code is converted to bytecode, the VM heap memory can be serialized to a rune.pdmp file, and subsequent runs can avoid bootstrapping and just load rune.pdmp instead.

The idea is based on emacs’ portable dumper (pdump) which replaced the older unexec. However, this pdmp format is a somewhat human-readable text format and makes no attempt to have any compatibility with unexec or pdump. https://lwn.net/Articles/707619/ https://github.com/emacs-mirror/emacs/blob/master/src/pdumper.h

StructsΒ§

DumpFile πŸ”’
Deserialized contents of a .pdmp file.
DumpState πŸ”’
DumpedBinding πŸ”’
An entry in the env section: a variable binding from symbol to value.
DumpedSymbol πŸ”’
An entry in the symbol table section: name -> (symbol object id, optional function object id)

EnumsΒ§

DumpedObject πŸ”’
A serialized representation of a single GC object, decoupled from live pointers. Children are referenced by ObjId rather than raw addresses.

FunctionsΒ§

dump_to_file πŸ”’
escape_str πŸ”’
extract_field πŸ”’
Extract value between key and delim (or end of string).
fmt_id_list πŸ”’
load_dump πŸ”’
parse_binding_line πŸ”’
Parse @{sym_id} = @{val_id}.
parse_bytefn πŸ”’
parse_dump πŸ”’
parse_field_ref πŸ”’
Parse prefix{id} from the start of s.
parse_hex_bytes πŸ”’
parse_object_line πŸ”’
Parse @{id} {type} {fields...} into (ObjId, DumpedObject).
parse_quoted_string πŸ”’
Parse "escaped string" and return the unescaped content.
parse_quoted_string_rest πŸ”’
Parse "escaped string" rest... returning (unescaped, rest).
parse_ref πŸ”’
Parse @{id} returning the id.
parse_ref_list πŸ”’
Parse space-separated @id @id ... list.
parse_symbol_line πŸ”’
Parse "name" -> @{id} or "name" -> @{id} func=@{fid}.
subr_registry πŸ”’
Registry mapping SubrFn names to their static references. Used by the loader to reconstruct function pointers from dump files. We serialize the name since Rust fn pointer names can’t be serialized, and look it up here on load.

Type AliasesΒ§

ObjId πŸ”’
Unique id for each object pointer, used to handle cycles and sharing.