Share application objects and use LLD in CI - #8362
Draft
Amaury Chamayou (achamayou) wants to merge 2 commits into
Draft
Share application objects and use LLD in CI#8362Amaury Chamayou (achamayou) wants to merge 2 commits into
Amaury Chamayou (achamayou) wants to merge 2 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.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.
Summary
OBJECTsupport toadd_ccf_app, preserving warnings, sanitizers, hardening, clang-tidy and coverage instrumentation. Exclude object libraries from the coverage executable inventory..github/workflows/ci.yml, install it for VMSS and pre-provisioned SNP runners, and retain existing downstream linker defaults.build/ninja.logwith each job's logs for whole-build and per-edge comparisons.Cold-build CI measurements
The target is cold full builds from an empty build directory, with no reused build outputs, not incremental builds or warm relinks. Each CI job creates a new
builddirectory, configures it, and runs the complete Ninja build. Object sharing eliminates duplicate compilations within that clean build; it does not reuse objects from earlier runs. These measurements do not establish cold OS page-cache conditions.This draft measures the combined full-build impact of object reuse and LLD. The comparison does not isolate their individual contributions. The existing test matrix and all three logging variants remain enabled. No compiler or build-artifact cache is introduced.
Compared the optimized CI run at
ce863391d239544ee936068de356719bf8c8338cwith the near-contemporaneous baseline CI run from changelog-only #8357. Both PRs share baseb9c429bb3467242e60d3e19dbe947cd251463a30, and all measured jobs use Clang 18.1.8. Both runs' VMSS jobs useStandard_D16ads_v6, image version52.0.0.Complete Ninja elapsed times, excluding configuration, dependency installation and tests:
The sum of the five build durations falls from 1600.3 s to 1541.7 s, saving 58.6 worker-seconds / 3.7%. The jobs run in parallel, so this is not 58.6 seconds off pipeline latency. Ninja's graph falls from 324 to 314 steps, consistent with eliminating ten compilations.
This is one matched comparison, not repeated controlled trials. Baseline elapsed times are measured from the logged
+ ninjainvocation to the final completed Ninja edge; optimized times use Ninja's final elapsed-time status. Any repeat measurements should likewise start from empty build directories, not reuse a previous build.Installation overhead currently erases the SNP build savings: the new
Install LLDsteps take 34 s on Milan and 28 s on Genoa. Including configuration, the build step falls from 426 s to 414 s on Milan and from 321 s to 301 s on Genoa, but adding LLD installation makes build-plus-install approximately 22 s and 8 s slower, respectively. Preinstalling LLD in the SNP runner images would avoid this per-job overhead; that image change is not included here. No reliable end-to-end pipeline speedup is established by this run.The approximately 32% local saving below is object reuse alone on the application subgraph, not the combined cold full-build CI saving.
Local diagnostic measurements (not cold full builds)
These isolated experiments helped select changes to try in CI. They are not evidence of cold full-build savings; the complete CI builds above are the relevant measurement for that objective.
Native Linux filesystem under WSL, Clang 21.1.8, Debug, Ninja
-j4:Identical existing objects, one warmup and three measured relinks per linker, median seconds. These are warm relink-only measurements, not clean builds:
js_genericloggingnode_frontend_testLLD is selected for the CI experiment; mold was only benchmarked locally.
Validation
--fail-on-warning, targeted CMake/Markdown/YAML formatting, release-note and ASCII checks passed.-fuse-ld=lld, compiled and ran an LLD smoke binary, checked all five workflow jobs' provisioning/timing paths, and ran ShellCheck on the modified dependency installer.A complete local default build/test suite was not run. All five CI build steps passed, but the optimized workflow is not green: SNP Milan's post-build
programmability_and_jwttest failed while starting node 0 withSEV-SNP: attestation version 2 is less than the minimum supported version 3.