Skip to content

build: keep line-table debug info only in dev and test profiles - #756

Merged
yifanxuaaa merged 1 commit into
layerfs_v2_0_0from
claude/debug-line-tables-v2
Nov 23, 2026
Merged

yifanxuaaa merged 1 commit into
layerfs_v2_0_0from
claude/debug-line-tables-v2

Conversation

@yifanxuaaa

Copy link
Copy Markdown
Contributor

What

Sets debug = "line-tables-only" in [profile.dev] and [profile.test] (root Cargo.toml). Manifest-only change.

  • Backtraces keep function, file and line.
  • Debugger locals need CARGO_PROFILE_DEV_DEBUG=2 / CARGO_PROFILE_TEST_DEBUG=2 (noted in the manifest comment).
  • Release profile unchanged, so product binaries and benchmark identities are unaffected.
  • CI already sets CARGO_PROFILE_TEST_DEBUG=0 in ci.yml, nightly.yml and store-ext4.yml, so CI is unaffected.

Diagnostic build check

One cold sample per arm, layerfs-content only, cargo 1.85.1, macOS aarch64, -j 6, host 1-min load 8.8–13.9 from other sessions. Taken on main 7d42d0b506 before rebasing onto v2. Not a product measurement.

Build Wall User CPU Target size Test executables
cargo build --tests (dev) 26.6 s → 14.3 s 66.4 → 49.9 s 964 → 800 MB (−17%) 214 → 205 MB
cargo test --no-run (test) 34.5 s → 31.9 s 162.8 → 143.7 s 1092 → 865 MB (−21%) unchanged

On macOS, debug info stays in object files, so executables barely change there; Linux builds should also shrink binaries (not measured).

After this lands, each existing worktree target rebuilds once and keeps old artifacts until it is cleaned (tools/cleanup.py).

Checks

  • cargo +1.85.1 test -p layerfs-content --no-run --locked --offline compiles on this branch (base 2f6718e193).
  • Production LOC: 206163 -> 206163 (delta 0); scope core+engine+control+api, tools/production_loc.py at parent 2f6718e193 and the committed tree.
  • Deleted tests: none.

🤖 Generated with Claude Code

Set debug = "line-tables-only" for [profile.dev] and [profile.test].
Backtraces keep function, file and line; debugger locals need
CARGO_PROFILE_DEV_DEBUG=2 / CARGO_PROFILE_TEST_DEBUG=2. The release
profile is unchanged, so product binaries and measurements are not
affected. CI already sets CARGO_PROFILE_TEST_DEBUG=0 and is unaffected.

Diagnostic build check, taken on main 7d42d0b before rebasing here
(one cold sample per arm, layerfs-content only,
cargo 1.85.1, macOS aarch64, -j 6, host 1-min load 8.8-13.9 from other
sessions; not a product measurement):
- cargo build --tests: 26.6 s -> 14.3 s wall, 66.4 -> 49.9 s user;
  target 964 -> 800 MB (-17%), deps 471 -> 347 MB (-26%)
- cargo test --no-run: 34.5 s -> 31.9 s wall, 162.8 -> 143.7 s user;
  target 1092 -> 865 MB (-21%); test executables unchanged on macOS
  (debug info stays in object files there)

Production LOC: 206163 -> 206163 (delta 0); scope core+engine+control+api,
tools/production_loc.py at parent 2f6718e and committed tree;
manifest-only change.
Reference absent (retired R9c; last counted 65,417 at tree 498dd19).
Deleted tests: none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yifanxuaaa
yifanxuaaa merged commit f56a43e into layerfs_v2_0_0 Nov 23, 2026
2 checks passed
@yifanxuaaa
yifanxuaaa deleted the claude/debug-line-tables-v2 branch November 23, 2026 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant