Repository navigation
Conversation
6f412d1 to
5211a02
Compare
Carry source-selected compiler queries through bounded guard discovery and fresh replay; derive content-addressed config capsules and retain conservative inputs whenever complete source/compiler dependency coverage is unavailable. Add real GCC/Clang family, intrinsic, macro-diagnostic and module metadata coverage, plus SONiC and QEMU matrix wiring and unchanged reuse regression gates. Include the optional-definedness BUILD formatting correction. This is an incomplete draft checkpoint: actual four-kernel and SONiC builds pass, but base/LZ4 sharing is only 5/1240 compiler nodes and the reuse gate fails. Planning latency and the remaining full CI matrix still need work. No release or merge is intended.
Pin twelve pre-refactor request and ordered-dependency identities across literal, symbolic and source-shell inputs. Preserve the single-use construction path without an extra deep copy; reusable contexts own their mutable request data. This is groundwork for discovery context transport, not a serialized handoff or a performance completion claim. Both Bazel root suites pass with the local nested-output-base test excluded.
Reproduced the ARM64 nVHE CI failure with the exact KVM allnoconfig: the literal ../fpsimd.S operand did not match its canonical source edge. Normalize only literal positional path identities before optional probe construction, preserve option/placeholder ownership, and keep the runner's exact occurrence check unchanged. Both Bazel root suites pass locally (177 tests each, nested-output-base test excluded). The real Clang KVM build now passes the initial probe stage; full kernel/matrix and performance validation remain pending. Temporary example reproduction edits are excluded.
|
Published checkpoint — 2026-09-13 13:10 UTC: This checkpoint ranks complete weak-hint closures by distinct consumers, adds bounded literal-header grammar discovery, preserves binding-probe capacity by separating speculative grammar from entered definitions, and handles ordinary identifier/literal adjacency used by Linux stringification macros. Grammar promotion keeps one executable attempt per compiler context; source facts still require measured answers. No compiler-family behavior tables, extra rounds, larger limits, or relaxed reuse thresholds were added. Exact source
The four-kernel run took 1,429.533 s (23m50s), with 24,436 remote-cache hits and 20 remote executions. No other owned local RBE job or published CI run overlapped it, but this is still a mostly cached workload, not a cold/native comparison. Completed remote-process wall times: initial planning ~267 s, guard rounds ~136/173/203 s, final verification ~241 s. Broad cross-config sharing, couple-minute cold planning and native-comparable builds remain unmet. The previous checkpoint's CI finished 64 successes and four reuse-gate failures after successful kernel builds. This new checkpoint still needs its full CI matrix; older SONiC/QEMU results do not prove coverage of this source. Both Bazel versions and both compilers remain in CI. Historical checkpoints follow; their descriptions and coverage apply to their own source versions: Published checkpoint — 2026-09-13: This checkpoint measures empty variadic-comma behavior with the selected compiler, preserves forward macro rescans, and retains bounded complete weak-hint query closures. Missing/rejected measurements remain conservative; no compiler-family behavior table or relaxed reuse threshold was added. Qualification of the exact published source (
The four-kernel run took 1,423.905 s (23m44s) with 24,435 remote-cache hits and 12 remote executions. It is mostly cached evidence, not a cold/native comparison. Completed remote-process wall times were ~272 s for initial family planning, ~137/162/201 s for guard rounds and ~225 s for final replay. Bazel 9.1/9.2 critical-path reporting has an action-template dependency gap; elapsed minus reported critical path must not be treated as client overhead. Partial hint retention repairs an intermediate 131-instance regression but still omits frequently needed query vectors. Consumer-frequency scheduling is the next investigation, not an implemented gain. The full SONiC/QEMU matrix has not been rerun on this exact checkpoint; older results below do not establish current-source coverage. Broad reuse, couple-minute cold planning and native-comparable builds remain unmet. Both Bazel versions and both compilers remain in CI. Historical worktree and published checkpoints follow: Local validation update — 2026-09-13 (unpublished worktree; the PR head is still The bounded counter-query selection and wider macro-call support passed root tests and the actual compiler fixtures. They also passed the full SONiC module matrix on GCC/Clang × Bazel 9.1/9.2, and all seven x86 Clang/9.2 kernel, QEMU, module, MODVERSIONS and SRCVERSION tests. These are worktree The actual four-config kernel build succeeded, but the unchanged reuse gate still fails at 132/7,842 reused instances (1.68%), with 7,710 unique nodes. Counter prefetch reduced missing-counter fallbacks from 329 to 109 base compiles, but 220 now stop at an unmeasured generated identifier; broader sharing did not improve. Elapsed 1,527.611 s with 21,277 remote hits and 3,131 remote executions is mixed-cache evidence, not a controlled cold/native speedup. A fresh bounded CPU capture exposed duplicate request validation/encoding. The subsequent unpublished worktree CI RBE, disabled action disk cache and default output directories were retained. Broad cross-config reuse, couple-minute cold planning and native-comparable builds remain open. No gates were weakened, and nothing was merged or released. Historical published checkpoints follow (the running jobs mentioned below have since completed): Latest checkpoint: Using CI RBE, no action disk cache, and the existing default output directories, production source
The actual four-config Clang/9.2 kernel build succeeded, but the unchanged reuse gate still fails at 132/7,842 saved instances (1.68%), with 7,710 unique nodes. Elapsed 1,369.762 s, 22,040 remote-cache hits and 18 remote executions: this is a warm-cache result, not a cold/native comparison. Completed process wall times were 277.682 s for the cut and 244.007 s for final replay. No overall planning speedup or reuse gain is established. The 117 base compile actions formerly stopped at COUNT_ARGS now reach the next limitation, __COUNT_ARGS' formal-argument budget. The 329 missing-counter-state failures are unchanged. Earlier counter availability/value hints, lower-priority admission and authenticated optional attempts have passed isolated tests on both Bazel versions, but that prototype is not included in this commit and still needs actual compiler/build integration validation. A GCC/9.1 x86 QEMU/module/MODVERSIONS/SRCVERSION batch is running, not yet reported as passed. Broad reuse, couple-minute cold planning and native-comparable builds remain unmet. No thresholds were relaxed; nothing was merged or released. Previous counter checkpoint: With CI RBE, no action disk cache and only the existing default output directories:
The actual four-config Clang/9.2 kernel build passed, but the unchanged reuse gate still fails at 132/7,842 saved instances (1.68%). Total elapsed 2,105.827 s with mixed remote-cache hits/executions; this is not a cold/native performance comparison. Completed planner process wall times were about 280 s for the cut and 242 s for final replay. No overall planning or reuse improvement is established. The real-kernel query manifests contain no counter-sequence requests in the three discovery rounds, even though final source replay now recognizes the counter binding and reports missing exact state. Earlier bounded query discovery remains necessary. Broad cross-config reuse, couple-minute cold planning and native-comparable builds remain unmet. Nothing was merged or released. Workspace cleanup removed unused repository-cache data, increasing available disk space from about 11 GiB to 29 GiB; active unpacked repositories and default output directories were preserved. The old action disk cache was already absent. Previous checkpoints (historical results): Latest update: Production source The four-config Clang/9.2 build succeeded. Its reuse report is byte-for-byte unchanged: 132/7,842 saved instances (1.68%), and the existing reuse gate still fails. No baseline was lowered. Completed process timings show no material x86 planner speedup (267 s cut, 241 s final replay). ARM initial Kbuild planning measured 1,065 s versus 1,108 previously; this is one comparison, not an established overall speedup. Different remote-cache populations make total build elapsed times unsuitable for a controlled comparison. The compiler-measured counter-state work remains an isolated prototype, not part of this commit. Query transport, runner argument validation and detached answer replay/merge are being tested before production scanner integration. Broad reuse, couple-minute planning and native-comparable builds remain unmet. Nothing was merged or released. Previous checkpoint: Production source
The actual four-config Clang/9.2 build succeeded, but the unchanged reuse gate still fails. Its report is byte-for-byte identical to the previous production report: 132/7,842 saved instances (1.68%), 7,710 unique nodes and only 6/1,240 typed compiles shared between base/LZ4. Elapsed 1,349.699 s, with 22,046 remote-cache hits and 12 remote executions; not a cold/native comparison. Same-process traversal microbenchmarks roughly halve the clustered case's time and reduce its allocations from 7.18 MB to 0.277 MB per batch; sparse queries also improve. This is not an established kernel speedup. Completed Clang planner process times remain roughly 267 s for the cut, 134/146/194 s for guard rounds, and 243 s for final replay. ARM initial Kbuild planning still took about 1,108 s. The couple-minute planning goal and broad cross-config reuse are unmet. An owner-lookup optimization and compiler-measured counter experiment remain isolated, not included in this commit. No thresholds were relaxed and nothing was merged or released. Earlier checkpoints: Previous production changes were pushed as CI cache-policy commit The v4 checkpoint interns repeated compiler-query stdin without raising the 64 MiB wire limit, restores exact request identities, and bounds expanded validation work. Replay now recomputes dependency-only Make reductions from the current oracle even when their symbolic aliases were pruned. Immutable source inventories and bounded query-program text are shared without caching compiler answers or replacing the restored input-set store. Verified on production source
Performance and broad cross-config reuse remain open. The preceding four-config Clang run built all actual targets, but its unchanged reuse gate failed: 7,710 unique nodes and 132 reused instances (1.68%), against floors of 160 and 2.03%. Its 1,357.492 s elapsed time was warm-cache evidence, not a controlled cold/native comparison. The published checkpoint's GCC CI lane also missed its reuse floors (140 versus 155 instances, 1.78% versus 1.97%). Before the final paste change, the allocation/pragma follow-up removed unnecessary query-validation/digest copies and let complete ordered macro-call proof distinguish discarded/stringified pragma arguments from executed effects. Production source The latest published source additionally handles valid token pasting of self-suppressed operands. A real GCC fixture first compiled correct bytes but failed precise sharing, then passed after the fix; an independent compiler object and all three family images check the emitted byte while existing sharing/invalidation assertions remain. Current production source The current four-config Clang/9.2 build built all four actual kernel targets. Its unchanged reuse gate still fails: 132/7,842 reused instances (1.68%), with only 6/1,240 typed compiles shared between base and LZ4 and zero between the other pairs. Elapsed 1,363.846 s, critical path 1,096.71 s; 22,048 remote-cache hits and 13 remote executions. This heavily cache-warm run also requested a separate guard CPU diagnostic; it is not a controlled cold/native comparison. The fresh guard sample attributes substantial CPU to dependency analysis and garbage collection. The two Clang examples CI failures reproduce these same reuse-floor violations, not a kernel compilation failure. Current Aya/Clang/9.1 passed 11/11, including actual aarch64 and x86 kernel/VM tests. Elapsed 1,815.946 s, critical path 919.55 s. ARMv7/GCC/9.1 also passed 3/3, building the actual kernel and external module and checking artifacts (not an ARM QEMU boot in this local lane). Elapsed 2,490.037 s, critical path 1,186.06 s. Source-integrity checks passed; these runs used RBE with no disk cache. The published main CI run is complete: 62 jobs passed, four failed. All four failures are the GCC/Clang × Bazel 9.1/9.2 examples reuse gates described above; their kernel builds succeeded. Broad reuse and cold/native performance targets remain unmet. No thresholds were relaxed, and nothing was merged or released. |
Current checkpoint — planner/query fidelity, 2026-09-12 17:31 UTC
Commit
9448c08212f5cd38ed7bf9a808d17372432bb170. Still draft; not ready to merge. No merge/release, gate relaxation, compiler-flag normalization, or new output bases. Local validation uses CI RBE with disk cache disabled.Changes in this checkpoint
__has_feature/__has_extensiongrammar support, requesteddefinedoperands, and earlier literal-defined(...)inventory queries. Source syntax supplies questions, never capability values.kbuild_cpu_profilediagnostic output group; update the README.Verified results and qualification limits
hello_c_module_armv7.ko; source fingerprint check passes. This is not a QEMU boot test. Elapsed 3,963.346s (66m03s), critical path 2,626.72s; 2,988 remote-cache hits and 7,474 remote executions. Initial Kbuild/snapshot/first guard/final replay action-processing envelopes are 741s / 796s / 809s / 951s. Correctness passes for this batch; the planning-performance objective remains unmet.Still required
Remove repeated Make/lowering work across execution phases, establish useful broad cross-config reuse, qualify cold/native-comparable performance, and finish the actual GCC/Clang/SONiC/QEMU matrix on Bazel 9.1.0 and 9.2.0. An isolated relocated-plan checkpoint now combines compiler request/expression state with full final-family/observed-header replay, using fresh configured scopes and current result oracles. It preserves nil/empty request state without changing request IDs or registry collision checks. This remains research only and is not included in this commit: production carrier/action-input binding, phase wiring, real Linux checkpoint validation and performance evidence remain required. Leading current Clang scanner barriers include
__signed__,_Pragma,__COUNTER__, generated config-name pasting and variadic comma semantics; they remain conservative, not hardcoded as safe.The retained native Make reference and historical measurements below remain qualified observations, not a direct speedup ratio.
The isolated combined-checkpoint and malformed-shape suite passes both copied Kconfig test targets on 9.1.0 and 9.2.0. These use fixture compiler-result records, not an actual Linux checkpoint build or a speedup measurement; they are not part of this commit.
Previous checkpoint — actual family builds and reuse gaps, 2026-09-12
03941c271, still draft. No merge/release, baseline relaxation, or new output bases. The production source remains frozen during real ARMv7 and Clang-family qualification.arch/x86/entry/vdso/vdso-note.oas precise in both base and LZ4 but assigned distinct final nodes; the cause is still under investigation. A local full Clang replay with targeted snapshot downloads is running.Isolated, unintegrated work: immutable same-phase projection sharing passes the copied Kconfig suite on both Bazel versions, but still needs an actual planner benchmark. Real selected-compiler RBE experiments also show that compiling original C after removal of one unused config definition preserves fixture object bytes with
-g0/-gon both GCC and Clang; GCC-g3and Clang-fdebug-macroretain the unused macro in debug output. GCC emits a use trace with-dU, while the configured Clang explicitly ignores it. These are bounded feasibility results, not a production config-dependency proof or a universal compiler adapter.Previous checkpoint — bounded ARM state frontiers, 2026-09-12
03941c271. Still draft: real current kernel/matrix validation, cold planning latency, native-comparable builds and useful cross-config reuse remain incomplete.Previous checkpoint — empty command selections and measured reuse, 2026-09-12
d611f20e359ffb56f69d3a69b275645cae1a4f75. Still draft: full current kernel/matrix validation, cold planning latency, native-comparable builds and useful cross-config reuse remain incomplete.findstringconditional reproduced the ARMvgettimeofday.ofailure (one concrete versus two symbolic occurrences) before the fix. Full Kconfig tests cover discovery/replay request identity, repeated command names with different arguments, empty/whitespace middle occurrences, unresolved discovery, failed oracle answers and retained compiler-bearing mismatch rejection.The completed GCC / Bazel 9.2 base, debug, BTF and LZ4 build on the preceding
d3b255579revision builds all four targets and confirms the private-output allocation fix:reboot.opair now references one final action node with unchanged recipe and input-set identity.The current published CI revision passes both root jobs, but all four x86 family jobs are red. Inspected Bazel 9.2 GCC and Clang logs confirm successful kernel builds followed by reuse-gate failures: GCC has 146 reused instances versus baseline 155; Clang has 133 versus baseline 160. Other matrix jobs remain running/queued. An isolated selected-compiler preprocessing experiment built 27 actions each with GCC and Clang over RBE: non-debug direct/split fixture objects match exactly, but debug metadata differs and GCC -g3 retains unused macros. This is only a feasibility experiment, not a production design change or kernel reuse result. Local qualification continues with CI RBE, disabled disk cache, minimal targeted downloads and existing default output directories. No merge or release.
Previous checkpoint — final private-output identity and ARM probes, 2026-09-12
d3b2555795a89eea946e74beb4a30d3a411ceca8. Still draft: current full-kernel/matrix validation, cold planning latency, native-comparable builds, and useful cross-config reuse are not complete.cmd_and_fixdepsuffix failure; fresh actual GCC ARM qualification remains pending.arch/arm/vdso/vgettimeofday.o; the kernel did not build.arch/arm/vdso/vgettimeofday.ohas one concrete compiler occurrence but two symbolic occurrences. Its source check passes; elapsed 1,154.087s, critical path 911.70s. This newly exposed mismatch remains unresolved. These are real artifact-build attempts, not graph-only checks; no current full-scale reuse improvement is claimed yet.The latest completed pre-fix four-config GCC / Bazel 9.2 run, on
f5e01c4bc, built all four targets but failed the unchanged reuse baseline: 5/1,240 base/LZ4 compiler nodes shared, 125 reused instances, 7,733 unique nodes. It took 2,899.424s with a 1,865.43s critical path. The finalreboot.ocomparison showed identical recipes and all 58 input markers, but different private output allocation paths; that evidence motivated the fix above. Other opaque macro-dependency cases remain and this fix alone does not establish the performance goal.Local runs use CI RBE, disabled disk cache, minimal targeted downloads and existing default output directories. Inputs were warm and runs overlapped, so timings are not controlled cold/native comparisons. The previous published CI run finished with eight failures (four x86 family jobs and four ARM jobs); the full matrix is being rerun on this revision. No merge or release.
Previous checkpoint — deferred generated compiler inputs, 2026-09-12
40b034d9f. Still draft: actual ARMv7, full-matrix qualification, planning latency, and useful cross-config reuse remain incomplete.scripts/mod/empty.ohas two concrete suffix commands but one compiler-probe suffix command. This is a newly exposed failure, not a successful kernel build. Source checks pass; the subsequent commit changes only test-input ordering. Separately, preceding-commit Clang ARMv7 CI reports a false mandatoryscripts/recordmcount.coperand in a compiler-dollar-punctuation query; it is not yet diagnosed/fixed.The completed family performance/reuse results below still qualify the preceding commit, not this one. A separate small-object RBE experiment found GCC
-save-temps=objobjects byte-identical to ordinary compilation, but Clang objects differ: decoded instruction output matches while DWARF line-table paths/checksums differ. The experimental source is not in this PR, and this does not establish a production phase split or cross-config action reuse. No merge or release.Previous checkpoint — module metadata and bounded RBE projection, 2026-09-12
af394b34e8e412636c4b23c9301a318d16238303. Still draft: corrected full ARMv7 and Bazel 9.1 large-kernel validation, the remaining matrix, planning performance, and useful cross-config reuse are incomplete.dfaf53456, before the following two fixes. Its source fingerprint stayed unchanged.The completed GCC / Bazel 9.2 family run on this commit builds the actual base, debug, BTF and LZ4 targets successfully, but the unchanged reuse gate fails: only 5/1,240 base/LZ4 compiler nodes are shared (125 reused instances, 7,733 unique nodes). Elapsed time is 2,800.017 seconds (46m40s). Its completed profile records three reached-header guard-planning actions of approximately 334s, 354s and 403s, followed by 494s of final replay; initial per-config Kbuild discovery ranges from 50s to 89s. These are observed action-processing intervals, not CPU-only measurements or a controlled cold/native comparison. Exact final snapshots and source checks were retained. For a sampled precise assembly action, raw recipes, all 42 persistent input bindings and relevant config values match across base/LZ4; all 37 inherited state producers are already included in the executed cut. The remaining final-identity split is not yet explained, and matching raw inputs alone is not a cache-equivalence proof.
An actual ARMv7 GCC / Bazel 9.1 run on this commit exposed a subsequent failure: an optional compiler-state query receives a deferred generated-content token as a stack-protector offset. A local, uncommitted fix rejects such premature optional queries without changing executable compiler flags or inventing an offset; its Kconfig/proberun regression suites pass, but full ARM validation is still running. This is not fixed in the published commit yet. Local runs use CI RBE, disabled disk cache, and existing default output directories. No merge or release.
Performance-evidence correction: a retained September 10 native Make reference does exist; the earlier claim that none had been measured was incorrect. Rechecked phase logs show 3.460s base configuration, 50.155s fresh-object base image, 1.882s no-change image rebuild, 2.916s LZ4 configuration switch, and 6.078s LZ4 image update. Only 1 CC + 2 AS steps repeated for LZ4. Both native configuration comparisons reported zero symbol-value differences against their captured Bazel configurations; retained host/target manifests and configuration hashes match the recorded pins. This was a single local
-j8, warm-filesystem reference using the earlier captured toolchain/configuration, not current four-config RBE qualification or a controlled cold-build comparison. Do not derive a direct speedup ratio from these unlike workloads.Previous checkpoint — source prerequisites and RBE reports, 2026-09-12
de566e5fbdb5055866dafc79791fd9b7b1ada00a. Still draft: actual corrected ARMv7 validation, the remaining matrix failures, planning performance, and useful cross-config reuse are incomplete.*.reuse-report.json. With the CI RBE configuration, the same mapped-kernel fixture build left the report absent before the change and materialized it afterward. The reuse gate and its thresholds are unchanged.The preceding CI revision built the four x86_64 example families successfully but failed report collection; its Linux 6.12 MODVERSIONS test additionally exposed a missing staged module source during modpost. One Aya job failed with an RBE keepalive error. Both host-platform jobs passed. These are observations of the preceding revision, not current full-matrix qualification. The poor reuse/planning measurements below remain the latest full-family performance evidence. No merge or release.
Previous checkpoint — ARM64 KVM probe fix, 2026-09-12
Pushed
1fd388f6da1341b16c9e4b467588406d109fabc6. Still draft: full matrix, planning performance, and useful cross-config reuse remain incomplete..../nvhe/../fpsimd.Sbut expected the canonical source path. Source-operand recognition now accounts for literal dot segments, without changing actual compiler argv, option payloads, or the runner's exact-occurrence checks. Unresolved symbolic words cannot be mistaken for literal source operands.CI is being rerun for this commit. The prior checkpoint's performance/reuse measurements below remain the latest measurements, not qualification of this revision. No merge or release.
Previous checkpoint — 5ba9da4, 2026-09-12
Pushed
5ba9da4ab59f7fb874a49d093d882a1568584527. This remains a draft: cross-config reuse and planning performance are not yet adequate. No merge or release is intended.//internal/tests/source_repo:source_repo_testis excluded because it creates additional Bazel output directories; it remains enabled in CI. Buildifier and Gazelle now pass.linux_ngbde.ko, vendor Kconfig enablement, and ARM64 exclusion tests pass in all four cells: GCC / 9.2, Clang / 9.2, GCC / 9.1, Clang / 9.1.The checkpoint includes bounded compiler-guard discovery, fresh source/compiler replay, content-addressed configuration capsules, real compiler diagnostic regressions, module metadata validation, and the reuse regression checker. Unsupported dependency proofs retain conservative inputs. No compiler-specific capability values, baseline relaxation, or warning suppression was added to make the reuse result pass.
Summary
map_directorypipelinelinux_ngbdemoduleDesign
Repository evaluation only discovers source inputs and declares the
map_directorystages. Compiler, assembler, linker, archive, binary-tool, pkg-config, and source-script probes run with the selected Bazel toolchains. Their typed results drive Kconfig resolution, Kbuild traversal, generated-content queries, action selection, and exact source/object-tree frontiers.The resulting plans preserve the selected toolchain and execution-platform identity, carry only declared source/tool/generated inputs, and fail closed when a command or compiler-derived value cannot be represented hermetically. External modules use the same Kconfig/Kbuild path as in-tree targets, including module SDK state, generated headers, modpost, source versions, and generated
.mod.ccompilation.This is a complete cutover: there is no repository-generated compatibility graph and no hard-coded Clang or GCC capability model left in the build API.
Validation from the previous checkpoint
These older results describe the previous PR revision, not full qualification of the current checkpoint above.
bazel test //...: 68/68 tests pass with Bazel 9.1.0bazel test //...: 68/68 tests pass with Bazel 9.2.0The PR remains draft while the full Clang/GCC and host-platform matrix completes and the reuse/performance gaps are addressed.