Repository navigation
Conversation
Signed-off-by: fleeto <dustise@live.com>
This branch has not been deployed
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
Aligns
[profile.dev]and[profile.test]inCargo.tomlto a hybrid debuginfo configuration (debug = "line-tables-only"for workspace/test crates,debug = 0for external dependencies) while preserving the existing[profile.dev.package."*"] opt-level = 2optimization.Root Cause
Previously,
Cargo.tomlenabledopt-level = 2on all external dependencies indev/testprofiles while leaving Cargo's defaultdebug = true(full DWARF). Becauselibralinks a large dependency graph across ~180 integration/unit test binaries:agent_bridge_checkpoint_test) produced a 2.001 GiB ELF (1.906 GiB/95.3%.debug_*sections) and droverust-lldto 8.936 GiB RSS (14.003 GiBcgroup peak,701memory.highthrottle events even at--jobs 1).cargo test --all/cargo nextest run --all) concurrently linked multiple multi-GiB binaries and overwhelmed developer machines with memory and page-cache pressure.Changes
[profile.dev]and[profile.test]todebug = "line-tables-only"(preservingfile:lineresolution forlibraand test code, verified viaaddr2line).[profile.dev.package."*"]and[profile.test.package."*"]todebug = 0(eliminating external dependency DWARF bloat and allowingcargo buildandcargo testto reuse dependency artifacts).CARGO_PROFILE_DEV_DEBUG=2/CARGO_PROFILE_TEST_DEBUG=2for full workspace DWARF,--config 'profile.test.package."*".debug=2'for dependency DWARF, andCARGO_PROFILE_TEST_DEBUG=0for minimal footprint).debug_assertions,opt-level, or[profile.release].Measured Impact (Cgroup:
CPUQuota=400%,MemoryHigh=14G,MemoryMax=18G,MemorySwapMax=1G)Single Heavy Target (
agent_bridge_checkpoint_test,--jobs 1)debug = true)memory.peak14.003 GiB(701high events)8.533 GiB(0high events)rust-lldpeak VmRSS9,150.74 MiB(8.936 GiB)1,819.40 MiB(567.44 MiBanon)2,048.58 MiB(2.001 GiB)195.14 MiB(101.05 MiB.debug_*)addr2lineonlibra::*& test cratefile.rs:linefile.rs:lineControlled Full-Suite Acceptance (
cargo nextest run --all --locked --offline --build-jobs 2 --test-threads 4 --no-fail-fast --retries 2)target/debugdisk growth 17.65 GiB (13.27 GiBacross 352 changed artifacts); 0 OOM / 0memory.max/ 0 swap.11,930passed,51skipped,85pre-existing environment/umask0002& registry drift failures unrelated to debuginfo); runtime cgroupanonpeak was only 1.316 GiB.cargo build --jobs 2produced a347 MiBtarget/debug/libra(8.74 GiBcgroup peak,0high events), followed bycargo test --no-run --test agent_bridge_checkpoint_test --jobs 2in 1.461s with0rebuilt artifacts.Verification
cargo fmt --all --check(formatting clean; note local host lacks nightly rustfmt for unstable import grouping)cargo clippy --locked --offline --lib --test agent_bridge_checkpoint_test -- -D warningscargo nextest run --locked --offline --build-jobs 2 --test-threads 4 --retries 0 --no-fail-fast --test agent_bridge_checkpoint_test --test compat_release_homebrew_verify --test compat_all_production_unwrap_guard --test agent_bridge_protocol_test(16/16 passed)cargo nextest run --all --locked --offline --build-jobs 2 --test-threads 4 --no-fail-fast --retries 2under cgroup limits (0OOM /0swap)