The entry replay_probe
The record and the replay of a process with a shared writer .
The test process starts a reader: a child of this module that maps a page with Write, which the test process maps with Write too. The kernel records the reader from its first instruction, so the test process is a shared writer that the gate holds. In each round the test process writes bytes that come from its own clock into the page, and the reader sums them with its trapped reads of the cycle counter and of cpuid. Then:
- The record holds one shared mapping, a delta of the shared page for each round, the cycle counter and cpuid, and ends with the stop of the reader.
- A replay of the history, in a new child that maps no shared page and has no writer, reaches the end of the history with no divergence: the kernel maps a private page where the record had the shared one, and writes each delta at its input point.
- A replay of a copy of the history with one byte of a delta changed stops at the first entry after it that carries the sum: its input point, the value of the history and the value of the replay.
What it is for. It is the machine test of the record of a shared writer, and of the replay with no peer.
Start: start("replay_probe") in the console. It starts each child from the boot image.
Grants, as the root service gives them: Image, the boot image, to start the children from it.
What a reader sees: one line for each case, which ends with "as it must", then "replay_probe: ok, 3 cases: ...", or "replay_probe: failed: N cases of 3". The process has no window.
replay_probe module with an entry
- Hash
3952b5af698ac15cdc144e603b4eef30cebd0207222235d88bbd22987b5322e7- Size
114688 bytes- Exports
0- Imports
0- Imported by
0- License
- MIT
The record and the replay of a process with a shared writer
| Fact | Value |
|---|---|
| Kind | Modules with an entry |
| Source | src/modules/tests/replay_probe |
| Boot image | yes: in the boot image, 114688 bytes in this build |
| Build settings | none: the defaults of the source |
| Imports | none |
| Imported by | none |
Neighbours
It imports no module, and no module imports it. The module graph shows it with the other modules that have no edge.
Exports
| Export | What it does |
|---|---|
entry() |
entry
entry()
- Form
- The entry of the module: one parameter, an address, fixed by the contract.
src/modules/tests/replay_probe/main.odin:137
Read from the source of the module, as the build reads it to describe the exports (tools/modustool/build/describe.odin).
What the root service gives it
| What | Value | As the root service says |
|---|---|---|
| Grants | The test of the record and the replay of a process with a shared writer: it starts its readers from the boot image. | |
| Other terms of its start grant set | none | |
| Budget that it asks for |
| The test process, a child at a time, and the threads of both. The working memory pays each child, its histories, and the point copies and private pages that the kernel takes from the budget of a history. |
The start grant set is read from start_grant_sets in src/modules/system/root/start_grant_sets.odin. The stated budget is read from the constant MODULE_BUDGET of the source of the module (its line); the build adds the counted parts and writes the sum in the module (tools/modustool/build/budget_count.odin); the root service accepts it up to the largest budget of a process, and adds the limits of processor time and of log records (src/modules/system/root/budgets.odin).
