summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md31
1 files changed, 22 insertions, 9 deletions
diff --git a/README.md b/README.md
index 07b0571..dfc0fb1 100644
--- a/README.md
+++ b/README.md
@@ -38,18 +38,31 @@ is another, with the recorder at its far end.
## A recording
-An xitdb file: a history of immutable **moments**. A moment is the state
-then (registers per thread, every byte of memory seen so far, the strings
-defined), sharing what did not change with the moment before, and the
-events that led to it. `Trace.moment(i)` is any of them, in any order: time
-travel is an index.
+An xitdb file: a list of immutable **moments**. A moment is the state of
+the program then, sharing what did not change with the moment before, and
+the events that led to it. `Trace.moment(i)` is any of them, in any order:
+time travel is an index.
+
+| `Moment` | from the events |
+| --- | --- |
+| `regs(tid)` | any event carrying `Regs` as its payload |
+| `read(addr, buf, known)` | `mem_write`: every byte seen so far, and which are known |
+| `heap()`, `allocation(addr)` | `alloc`, `free`: the live allocations |
+| `stack(tid)` | `call`, `ret`: the calls a thread is inside |
+| `variables()` | `variable`: the live named variables; a local goes with its call |
+| `line(tid)` | `line` |
+| `mappings()`, `mapping(addr)` | `map`, `unmap` |
+| `string(id)` | `string` |
+| `events()` | everything, as it came |
The recorder ends a moment at the kinds in `Recorder.cut` (by default a
step, a breakpoint, a syscall's exit, a signal, a source line, a mark), so
-the cost of time travel is chosen per recording. Measured (release, this
-machine): a moment costs about 10 µs and 1 KB before its own data; an
-instruction-level recording of `fib(12)`, 145 000 moments, is 245 MB at
-56 000 moments a second; events inside a moment cost their own bytes only.
+the cost of time travel is chosen per recording; moments are written 256 a
+transaction. Measured (release, this machine): a moment holding one small
+event is 284 bytes and about 1 µs (936 000 a second through the ring); an
+instruction-level recording of `fib(12)` under ptrace, 142 000 moments each
+with the registers, is 111 MB at 165 000 moments a second. Events inside a
+moment cost their own bytes only.
## Depends on