refactor(scheduler-sim-decision-trace): split trace sources under the 800-line cap

Task 2.4: outcome capture moves to sched_trace_outcome.c and the
position/host/summary/rollback half of the model to sched_trace_scan.c;
shared helpers go behind sched_trace_internal.h (sti_ prefix). Code is
moved unchanged; every target that compiles the trace sources gets all
four, and the core isolation scan covers the new files.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-10-08 10:16:46 +00:00
parent eacb1fa599
commit 144a01982e
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C
40 changed files with 1355 additions and 1094 deletions

View file

@ -241,6 +241,18 @@ sched_core_isolation_test = executable(
+ (meson.current_source_dir() / '..' / 'src'
/ 'sched_trace_capture.c')
+ '"',
'-DXCE_SCHED_TRACE_SCAN_C_PATH="'
+ (meson.current_source_dir() / '..' / 'src'
/ 'sched_trace_scan.c')
+ '"',
'-DXCE_SCHED_TRACE_OUTCOME_C_PATH="'
+ (meson.current_source_dir() / '..' / 'src'
/ 'sched_trace_outcome.c')
+ '"',
'-DXCE_SCHED_TRACE_INTERNAL_H_PATH="'
+ (meson.current_source_dir() / '..' / 'src'
/ 'sched_trace_internal.h')
+ '"',
'-DXCE_CORE_LIB_PATH="'
+ sched_core_isolation_lib.full_path()
+ '"'],
@ -2520,10 +2532,12 @@ test('scheduler repl trace baseline test',
# scheduler-sim-decision-trace task 1.3: decision trace record model
# (src/sched_trace.c) unit tests -- selection matching, record header and
# per-record arena copying and size, record finishing. Links only the model
# source; libxce supplies the jobid helpers.
# sources (sched_trace.c and, since task 2.4, sched_trace_scan.c); libxce
# supplies the jobid helpers.
sched_trace_model_test = executable(
'sched_trace_model_test',
['test_trace_model.c', '../src/sched_trace.c'],
['test_trace_model.c', '../src/sched_trace.c',
'../src/sched_trace_scan.c'],
include_directories:[incdir],
dependencies: [scheduler_test_deps],
install: false)
@ -2537,7 +2551,8 @@ test('scheduler trace model test',
# src/decision.c; links the record model for its constructor and free.
sched_decision_trace_test = executable(
'sched_decision_trace_test',
['test_decision_trace.c', '../src/sched_trace.c'],
['test_decision_trace.c', '../src/sched_trace.c',
'../src/sched_trace_scan.c'],
include_directories:[incdir],
dependencies: [scheduler_test_deps],
install: false)
@ -2549,11 +2564,13 @@ test('scheduler decision trace test',
# scheduler-sim-decision-trace task 2.1: capture helpers (design.md
# "TraceCapture") over a fixture core and job -- selection facts,
# cluster-wide limits and attempt failure reasons. Links the record model
# and the capture source; libxce supplies the pend-reason helpers.
# and the capture sources (split in task 2.4); libxce supplies the
# pend-reason helpers.
sched_trace_capture_test = executable(
'sched_trace_capture_test',
['test_trace_capture.c', '../src/sched_trace.c',
'../src/sched_trace_capture.c'],
'../src/sched_trace_scan.c', '../src/sched_trace_capture.c',
'../src/sched_trace_outcome.c'],
include_directories:[incdir],
dependencies: [scheduler_test_deps],
install: false)