Expand description
Everything to do with post-processing hermit/detcore logs.
Structs§
- Bitwise
Info V1Diagnostics - Output-only settings for a canonical
BitwiseInfoV1comparison. - Comparison
- A comparison of two strings.
- Comparison
Side Labels - Reader-facing names for the two inputs to a log comparison.
- LogDiff
Opts - Options for calling
log_diff. - LogDiff
Summary - What a log comparison actually compared, alongside whether it differed.
- Prefix
Comparison - A comparison of two logs that may still be growing.
Enums§
- DetLog
Filter - Indicates which DETLOG entries to be used for log-diff comparison
- LogComparison
Mode - Selects the set of log messages compared for determinism.
Constants§
- CANON_
ADDRESS_ ORDINAL_ V1 - Versioned policy token for lossless host-address ordinalization.
- STRIP_
WALL_ CLOCK_ PREFIX_ V1 - Versioned policy token for the only prefix removed by
BitwiseInfoV1. - TRUNCATION_
MARKER - The in-band line a bounded log writer emits when a run’s log file reaches its configured size bound.
Functions§
- compare_
complete_ bitwise_ info_ v1_ prefix - Compare the complete common prefix of two growing logs under the fixed
BitwiseInfoV1policy. - compare_
complete_ prefix - Compare only the records both logs have finished writing.
- compare_
complete_ prefix_ with_ filter - Compare the complete common prefix after applying a caller-supplied record filter. Product callers must bind the predicate to a typed, serialized policy; this backend-neutral layer intentionally carries no backend policy identity.
- complete_
record_ count - How many records in
contentsare known COMPLETE. - host_
addr - Wrap a host memory address so
canonicalize_addresses_in_linewill canonicalize it. Producers that print a genuinely host-specific pointer (one that varies run-to-run, e.g. a supervisor-side allocation) should emit it via this helper –<hostaddr 0x7fcfb7e7d450>– instead of a bare0x...literal. Only marked addresses are canonicalized, so reproducible hex (syscall arguments, guest memory ranges, digests) is compared exactly. - log_
diff - Process log messages from two files. Log messages look like this: “Apr 09 06:08:03.100 INFO detcore: [detcore, dtid 2] finish syscall: close(2) = Ok(0)”
- log_
diff_ detailed - Like
log_diff, but returns the counted comparison evidence rather than a bare boolean. - log_
diff_ summary_ from_ strs_ with_ filter - Compare two in-memory logs after applying a caller-supplied record filter.
- log_
was_ truncated - Whether
log_textis the output of a writer that hit its size bound. - record_
count - Total records in a log, including a final record that may still be being
written. Use
complete_record_countwhen the log is still growing. - strip_
log_ entry - In fully-deterministic modes, many log lines should be fully determinstic across runs. But as that is a work-in-progress, this utility strips known-nondeterministic information from logs.
- take_
complete_ records - The prefix of
contentsholding exactly its firstncomplete records. - try_
compare_ bitwise_ info_ v1 - Compare two current Hermit logs under the canonical
BitwiseInfoV1policy. - try_
compare_ bitwise_ info_ v1_ bytes_ with_ records - Canonical comparison over bytes already captured by the caller.
- try_
compare_ bitwise_ info_ v1_ bytes_ with_ records_ and_ diagnostics - Canonical comparison over captured bytes with output-only diagnostics.
- try_
compare_ bitwise_ info_ v1_ with_ diagnostics - Canonical file comparison with caller-selected diagnostic output.
- try_
compare_ bitwise_ info_ v1_ with_ records - Canonical comparison plus total complete-record counts from both inputs.
- try_
compare_ bitwise_ info_ v1_ with_ records_ and_ diagnostics - Canonical file comparison with caller-selected diagnostic output.
- try_
log_ diff_ detailed - Fallible form of
log_diff_detailedfor user-facing callers. Missing or unreadable inputs are ordinary command errors, not process panics. - try_
log_ diff_ detailed_ with_ filter - Fallible log comparison with a caller-supplied record filter.
- try_
log_ diff_ with_ records - Like
try_log_diff_detailed, but also reports how many records each log contained. Every log comparison should be able to say what it read, so a caller is never left to infer coverage from a bare verdict. - try_
log_ diff_ with_ records_ and_ filter - Compare two logs with a caller-supplied record filter and report source counts. Product callers must bind the predicate to a typed, serialized policy; this backend-neutral layer intentionally carries no backend policy identity.
- write_
bitwise_ info_ v1_ bytes - Render the canonical INFO messages that
BitwiseInfoV1would compare from bytes already captured by the caller. - write_
canonical_ info - Print the canonical INFO messages that strict verification would compare for one captured log.
- write_
canonical_ info_ with_ filter - Print canonical INFO messages after applying a caller-supplied record filter.