Expand description
Per-run syscall histograms: how many times the guest made each syscall, and what Detcore did with it.
Detcore counts every syscall entry by number, at the same accounting point
as the run summary’s scalar syscalls count, and at the end of its handler
records one SyscallOutcome. Each thread keeps its own
SyscallHistogram and hands its nonzero slots
(SparseSyscallHistogram) to the scheduler with its other final
statistics when it deregisters, so a run’s histogram covers exactly the
calls of the syscalls total. The run summary reports the merged histogram
as a SyscallHistogramSummary: sparse, ordered by x86-64 syscall number,
each entry carrying the pinned syscall name, together with the
SyscallObservationScope that says whether the accounting point saw
every syscall the guest made.
This is the producer the compatibility-website plan asks for
(dev-hermit ai_docs/compatibility-website-vision-and-implementation-plan-20260830.md,
“Syscall totals” and Stage 3).
Counting reads no guest state and changes nothing the guest can observe.
Structs§
- Compact
Syscall Histogram - A run’s syscall histogram in the compact form machine records keep: the
verification report’s
runtime.run1/run2, and from it each cell’s result row and the durable series row (run 1 only). Names are left out: a reader takes them from the pinned table forarchitecture. - Sparse
Syscall Histogram - A finished thread’s histogram: only its nonzero slots,
(number, counts)by ascending number. - Syscall
Histogram - A histogram indexed by x86-64 syscall number, as Detcore collects it: a
dense array with one
SyscallOutcomesper table slot, allocated once when the thread’s state is created, so counting a syscall is two array increments with no allocation and no lookup. A thread that exits hands over only its nonzero slots (SparseSyscallHistogram), and the run’s total sums those back into one dense histogram. - Syscall
Histogram Entry - One syscall’s counts in a
SyscallHistogramSummary. - Syscall
Histogram Summary - A run’s syscall histogram as the run summary reports it.
- Syscall
Outcomes - Counts for one syscall.
Enums§
- Syscall
Observation Gap - Why the accounting point did not see every syscall the guest made.
- Syscall
Observation Scope - Whether a histogram counts every syscall the guest made.
- Syscall
Outcome - What Detcore did with one completed syscall.
Constants§
- SYSCALL_
TABLE_ SIZE - Slots in a
SyscallHistogram: one per number of the pinned x86-64 syscall table, gaps included.
Functions§
- pinned_
syscall_ table - Every syscall the pinned x86-64 table names, as
(number, name)by ascending number. A coverage report takes its never-exercised list from this, so it names exactly the syscalls a histogram can count.