The entry log_flood
The writer of the machine test of the record output log . The test module output_wiring starts it with a wiring list whose one row wires its log to the asker. Its log budget holds 0 records of each second (the root service, budgets.odin), so the kernel refuses each of its log calls, whatever the speed of the machine, and none of its lines is in the log of the kernel. Its wired log holds each one.
It writes, in this order:
- 1. FLOOD_LINES lines "log_flood: line <n>", each with its number as a value run: more than the default capacity of a ring, so the asker holds it at least once;
- 2. one line of LONG_LINE_BYTES letters, which the cut of the kernel puts in three records joined by
more; - 3. the fact Flood_Fact, at the level Warning;
- 4. the line "log_flood: the kernel refused <n> lines", with the count of the calls that the kernel refused before it (system.log_lines_refused);
- 5. HELD_LINES more lines, which the asker never reads: the ring fills, and this process waits for room. The asker closes its end; the end word ends the wait, the library removes the ring, and the rest of the lines go to the kernel log only, which refuses them. Then it stops with Done: a writer of log is never held past the end of its reader.
The asker checks each record of 1 to 4, and that the count of the last line is the count of the calls before it: the log of the kernel lost each line, and log none. Then it checks the outcome Done.
No step of a machine test waits for a line of this process: the kernel keeps none of them.
Start: by output_wiring only. What a reader sees: nothing in the log of the kernel. It stops itself with the outcome Done.
See: Log facts: typed records in place of formatted lines: The record output log in the repository
log_flood module with an entry
- Hash
2e8df18a24b3081dc7623f2bb9f93c7a2be3a3f200de0f621f4969944a42d1ff- Size
32768 bytes- Exports
0- Imports
0- Imported by
0- License
- MIT
The writer of the machine test of the record output log
| Fact | Value |
|---|---|
| Kind | Modules with an entry |
| Source | src/modules/tests/log_flood |
| Boot image | yes: in the boot image, 32768 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/log_flood/main.odin:55
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 | none | The writer of the test of the record output log: its end comes in its context before its first instruction, and it needs no grant. Its log budget holds 0 records (budgets.odin). |
| Other terms of its start grant set | none | |
| Budget that it asks for |
| No MODULE_BUDGET in its source: it asks for the least budget. |
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; 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).
