Skip to content

serial: timestamp --serial-log lines with a UTC wall clock - #325

Merged
techomancer merged 1 commit into
techomancer:mainfrom
irix7:pr/serial-log-timestamps
Oct 25, 2026
Merged

techomancer merged 1 commit into
techomancer:mainfrom
irix7:pr/serial-log-timestamps

Conversation

@belikh

@belikh belikh commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

A harness tailing --serial-log cannot tell a slow boot from a missing line, and a held partial line is indistinguishable from no output at all.

  • New serial_log_timestamps config key and --serial-log-timestamps off|wall. off (the default) writes raw bytes, byte-for-byte a transcript; wall prefixes each completed line with a UTC ISO-8601 stamp, e.g. [2026-10-25T06:28:11.818188Z] ROM: ARCS PROM replacement booting.
  • One shared SerialLog sink serves the CI and TCP backends, so both paths write identical bytes. A partial line is held until its newline (a stamp must belong to the line it starts) and flushed on machine stop; the O2's fresh-per-boot log uses the same sink.

Evidence:

  • Three unit tests: raw mode byte-identical, wall mode stamps each completed line and holds/flushes the partial, and the stamp shape. cargo test -p iris --lib dev::serial_log — 3 passed.
  • Live boot of the IRIX 7 ROM with the release-exact flag: the log opens with [2026-10-25T06:28:11.804393Z] and [2026-10-25T06:28:11.818188Z] ROM: ARCS PROM replacement booting.
  • cargo test --workspace on upstream/main: 1337 passed, 0 failed.

The fork's guest/both timestamp modes depend on its cycle-derived clock and are not part of this PR; they stay with the clock-model discussion (#322).

A harness tailing --serial-log cannot tell a slow boot from a missing line, and a partial line is indistinguishable from no output. Add serial_log_timestamps = off|wall (--serial-log-timestamps): off stays a byte-for-byte transcript, wall prefixes each completed line with a UTC ISO-8601 stamp. One shared sink serves the CI and TCP backends, a partial line is held until its newline and flushed on stop, and the O2's fresh-per-boot log uses the same sink.
belikh added a commit to irix7/iris that referenced this pull request Oct 25, 2026
A quiet-host rerun of the same release binary and config reaches the system menu in seconds, so the workaround stays but the issue is not a confirmed emulator bug. Also records serial timestamps as sent upstream (techomancer#325).
belikh added a commit to irix7/iris that referenced this pull request Oct 25, 2026
@techomancer
techomancer merged commit ed17f88 into techomancer:main Oct 25, 2026
7 checks passed
belikh added a commit to irix7/iris that referenced this pull request Oct 25, 2026
Adopt the upstream work that landed since the fork's last sync:

- jitv2: skip the FP exception model for ordinary operands (techomancer#328)
- jitv2: inline the FPU integer conversions (techomancer#332)
- serial: wall-clock timestamps for --serial-log (techomancer#325)
- physical: a sparse, host-mapped decode table over 40 bits
- pit: implement the 8254 read-back command
- O2: the AIC-7880 specification, shared [scsi.N] disks, fresh serial log
- docs: Odyssey references and the AIC-7880 emulation notes

Conflict resolutions:

- serial log: take upstream's one shared sink and the off|wall timestamp
  modes; delete the fork's guest/both synthetic-clock sink and its
  partial-line flusher. The CI and TCP paths still share the sink, and the
  fork's per-consumer console cursors are unchanged.
- config: use dev::serial_log::SerialLogTimestamps; remove the local enum,
  the microsecond formatter and the guest/both parsing tests.
- CHANGELOG/FEATURES/HELP: keep the fork's October sections and the
  instance/fleet entries, adopt upstream's JIT v2 and O2 text, and drop the
  duplicated O2 sync and machine-start entries.

Tests: cargo test --workspace --features lightning,jitv2.
belikh added a commit to irix7/iris that referenced this pull request Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants