testsAndMisc/linux_configuration/C/atop_agg
Krzysztof kuhy Rudnicki da1e0d3588 atop_agg: split atop_agg.c 478 -> 204 + state + emit
Three units along the file's own concerns:

  atop_agg.c (204)        ingest -- tokenising atop output, folding lines, main
  atop_agg_state.c (113)  the per-PID hash tables, slot lookup, epochs, alloc
  atop_agg_emit.c (178)   the ranked, name-aggregated report

Table geometry and the four table functions that now cross a unit boundary go
in a private atop_agg_internal.h. Those four lose `static` -- the one
visibility change here.

The Makefile edit is the load-bearing part: SRC had to grow or the build would
have linked the old single unit and the suite would have passed with the new
files unused. Checked by reading the compile line, not the exit status.

I had written this file off as unverifiable earlier. Wrong: the Makefile has
had test and coverage targets all along. Coverage is 92.9% lines / 100%
functions on the same 211 source lines, before and after -- the best verifier
of anything left over the cap. Production binary builds at -O2 and runs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
2026-08-17 10:49:46 +02:00
..
.gitignore fix(usage_report): stop charging atop's HZ field as CPU; bundle since-last-report mode 2026-06-04 18:13:47 +02:00
atop_agg_emit.c atop_agg: split atop_agg.c 478 -> 204 + state + emit 2026-08-17 10:49:46 +02:00
atop_agg_internal.h atop_agg: split atop_agg.c 478 -> 204 + state + emit 2026-08-17 10:49:46 +02:00
atop_agg_state.c atop_agg: split atop_agg.c 478 -> 204 + state + emit 2026-08-17 10:49:46 +02:00
atop_agg.c atop_agg: split atop_agg.c 478 -> 204 + state + emit 2026-08-17 10:49:46 +02:00
atop_agg.h fix(usage_report): stop charging atop's HZ field as CPU; bundle since-last-report mode 2026-06-04 18:13:47 +02:00
Makefile atop_agg: split atop_agg.c 478 -> 204 + state + emit 2026-08-17 10:49:46 +02:00
run.sh fix(usage_report): stop charging atop's HZ field as CPU; bundle since-last-report mode 2026-06-04 18:13:47 +02:00
test_atop_agg.c fix(usage_report): stop charging atop's HZ field as CPU; bundle since-last-report mode 2026-06-04 18:13:47 +02:00