Repository navigation
Merged
Conversation
As PID 1 the sampler starts before /proc is mounted, and its samples until then held zeros. The first sample that read /proc then differed from zero by everything the kernel had counted since it started. In the lab's chart (spin-stack/machine#534, run 45060814905) that one interval read 21 MB, wrote 124 KB and ran 79 ms of CPU, so the CPU and pressure graphs began with a full bar, and the IO graphs' 250 ms smoothing turned the jump into a ramp: the write graph had the read graph's shape in a boot whose only write was the 124 KB before the chart began. The samples before /proc now carry the first counters it gives, so counting starts there and the JSON's differences start at zero too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The "CPU[overall] wait" graph drew the sum of every task's run delay from /proc/schedstat (systemd#13). Two tasks waiting at once count twice, so on the guest's one vCPU it sat at its ceiling from 100 ms to the end of the lab's chart (spin-stack/machine#534), and read like a boot bound by IO. The fork already draws /proc/pressure/cpu, the share of each interval in which some task waited for a CPU, which had the same outline with its texture kept. With the wait graphs gone, CPU pressure sits right under CPU utilization. Each process's bar and the tables still say who waited and for how long, and the JSON keeps the summed counter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… are Nothing on the chart said that a dashed line joins a process to its parent (systemd#39), or what a bar's blue, yellow and orange are. The graph's title now says both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream named processes from the first line of /proc/PID/sched, and lost a name's first characters to it, "(systemctl)" as "(ystemctl)" (systemd#44), and every name on a kernel without the file, whose tables then listed "[0]" (systemd#34). The fork names a process by its comm, and by its exe for a comm of digits (spin-stack/machine#528), and reads no sched file. The identity test now holds both: a "(systemctl)" keeps its first character, which a mutation that dropped it showed the test catching, and with no sched file under --proc no process is nameless and no table lists "[0]". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream's chart left out systemd-backlight@backlight:intel_backlight.service (systemd#40), a unit that runs for a moment and whose name holds "@" and ":". The fork draws every process that ran while the chart did (spin-stack/machine#525) and reads the unit from the cgroup v2 path whole. The short-lived test now holds it: an instance that ran 0.4 ms is drawn and labelled with its unit, and a mutation that cut the path at ":" showed the test catching it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since font sizes carry their unit (spin-stack/machine#528) the two lines that say what the samples were and what they cost are drawn at the 8px of the time axis' labels, and were hard to read (spin-stack/machine#534). They are now drawn like the header's other lines, 12px and 15px apart, which leaves 30px before the tables' titles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Boot charts a reader can trust without guessing, so the delays to a cold boot's first SSH login in spin-stack/machine can be explained with evidence. This fixes, in the fork, the upstream issues that matter to how that machine runs the sampler (triaged in spin-stack/machine#534), and two faults found in the lab's chart from #9 (lab run 45060814905).
What changes for a reader
pgpgout, KB submitted to block devices for writing, the whole guest's). It was drawing the counter's starting value. The samples before /proc now carry the first counters it gives.tests/before-procfails on main with every graph drawing that jump.cpu_wait_ns.read_one_line_fileare cppcheck not modelling_cleanup_fclose_. Everyfopenandfdopenin the tree is closed by a cleanup attribute or on each path.Verification
Lab run 45064083873 (bench, spin's shape, v20261122.05, 3 boots) drew this branch's 1f00a0f. In each of the 3 charts the write graph is empty, and pgpgout reads 124 KB in every sample. The first samples before /proc carry the first counters (for example 21409 KB read, 81.8 ms CPU from 86.6 to 101.9 ms). There is no wait graph, CPU pressure sits under CPU utilization, the header's two lines are drawn at 12px, and the process graph's title carries its legend.
CI passes on gcc and clang under ASan and UBSan. Locally,
make checkin ubuntu:24.04 passed all 8. One earlier local run, made while two other test builds shared the laptop, failed io, json and short-lived on samples the sampler dropped under load. Its rerun at load average 14 passed, and those tests use none of the changed code. Each new assertion was watched failing first, on main's code forbefore-proc, the wait graph, the legend and the header, and on a deliberate mutation for the three holding tests.🤖 Generated with Claude Code