The program inspect
A developer tool: the memory and the execution of one program, live (docs/TOOLS.md).
The person chooses a program in the list at the left: up and down, a click, or letters that filter the list. The window shows the address space of the program as one band and a table, its modules, its threads with the state of the scheduler, and the stop report of a program that stopped on a fault, each address as "module + offset". A sample of the reports of the kernel comes each 250 ms; a value that changed is drawn in the color of the boot program for one sample. Space freezes the sample. Tab shows the bytes of the memory of this program itself (hex.odin).
The program holds the machine with the right Inspect and the boot image (the names of the modules and their exports), and nothing more: it reads reports, it changes nothing, and it reads no byte of another program. It also serves the same facts as tables (exports.odin).
| Fact | Value |
|---|---|
| Source | programs/inspect |
| Boot image | in the boot image; the image is not built, so its size is not known |
| Imports | none |
| Imported by | none |
Exports
| Export | What it does |
|---|---|
| mappings(program: Text) -> Table(Mapping) | gives one row for each mapping of the program with this name, in the order of the addresses: the address, the module and the offset when a module holds it, the pages, the pages with a page frame, the kind, the rights, the memory object and how many handles and mappings name it |
| threads(program: Text) -> Table(Thread) | gives one row for each thread of the program with this name: its thread area, its state, the processor that runs it and its home queue, its weight and its request, its virtual time and its lag, its processor time, the words of its word wait and the end of its wait |
| modules(program: Text) -> Table(Module) | gives one row for each module record of the program with this name: the name in the boot image, the hash, the base and the size |
| entry() |
Read from the source of the module, as the build reads it to describe the exports (tools/kerneltool/describe.odin).
What the root service gives it
| What | Value | As the root service says |
|---|---|---|
| Grants | {.Inspect, .Image, .Serve} | A developer tool: it reads the reports of the machine and the names of the modules, and serves the same facts (docs/TOOLS.md). |
| Budget: pages, programs, threads | {pages = 2048, programs = 1, threads = 1} | Not named in things_of: the budget of each other program. |
Read from grants_of and things_of in programs/root/main.odin; budget_of in the same file adds the limits of processor time and of log records.
