Skip to content

Make -ftime-trace hasheable as in pre 0.18 - #2956

Merged
sylvestre merged 1 commit into
mozilla:mainfrom
Felixoid:clang-ftime-trace
Nov 20, 2026
Merged

sylvestre merged 1 commit into
mozilla:mainfrom
Felixoid:clang-ftime-trace

Conversation

@Felixoid

@Felixoid Felixoid commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Since v0.18.0 (PR #2834) any compile with -ftime-trace can't be cached. The trace doesn't affect the object, so this goes back to the v0.17.0 behavior: hash and pass the flag through, and produce no trace on a cache hit.

Reference: ClickHouse/ClickHouse#127827

@codecov-commenter

codecov-commenter commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.55%. Comparing base (dac6c80) to head (13b7886).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2956      +/-   ##
==========================================
+ Coverage   78.54%   78.55%   +0.01%     
==========================================
  Files          74       74              
  Lines       44039    44056      +17     
==========================================
+ Hits        34591    34609      +18     
+ Misses       9448     9447       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/compiler/clang.rs Resolved
Comment thread src/compiler/clang.rs Resolved
Comment thread src/compiler/clang.rs Resolved
@Felixoid

Copy link
Copy Markdown
Contributor Author

Dear @sylvestre, it looks like we addressed all points here.

Could you PTAL?

@sylvestre
sylvestre merged commit c4785b9 into mozilla:main Nov 20, 2026
51 checks passed
@sylvestre

Copy link
Copy Markdown
Collaborator

Thanks for your PR

alexey-milovidov pushed a commit to evillique/ClickHouse that referenced this pull request Nov 29, 2026
0.18.0 and 0.19.0 made `-ftime-trace` uncacheable (mozilla/sccache#2834),
which 27 CI build types pass through -DENABLE_BUILD_PROFILING=1, so CI
stayed on 0.17.0. 0.20.0 hashes the flag again and writes no trace on a
cache hit (mozilla/sccache#2956). It also leaves CARGO_TARGET_DIR and
CARGO_BUILD_* out of Rust keys (ClickHouse#3050) and hashes the C/C++ input file
name (ClickHouse#2974).

Measured locally with CI's cmake flags and a local disk cache, second
build from a fresh build directory at the same path:
- amd_binary clickhouse-bundle: 1562 s cold, 147 s warm; C/C++ 17715 of
  17717 hits (the 2 misses are openldap's generated version files with
  __DATE__/__TIME__), Rust 603 of 603; no hit wrote a time trace.
- amd_asan_ubsan dbms: 1934 s cold, 95 s warm; C/C++ 16237 of 16239,
  Rust 529 of 529.
- PR-build environment (READ_ONLY, anonymous S3): the server starts, a
  miss compiles, the write is refused, warn_on_low_sccache_hit_rate
  parses the stats. 0.20.0 additionally counts an anonymous 403 on a
  missing key as a read error (ClickHouse#2967); it is still a miss.

0.20.0 treats `--embed-dir` as uncacheable, so the 4 _jieba sources
(6.9 s of compile) are always compiled. 0.20.0 does not read 0.17.0
entries: every build type is cold once after this lands.

Related: ClickHouse#127827

Co-Authored-By: Claude Opus 5.5 <[email protected]>
alexey-milovidov pushed a commit to lazerg/ClickHouse that referenced this pull request Nov 30, 2026
0.18.0 and 0.19.0 made `-ftime-trace` uncacheable (mozilla/sccache#2834),
which 27 CI build types pass through -DENABLE_BUILD_PROFILING=1, so CI
stayed on 0.17.0. 0.20.0 hashes the flag again and writes no trace on a
cache hit (mozilla/sccache#2956). It also leaves CARGO_TARGET_DIR and
CARGO_BUILD_* out of Rust keys (ClickHouse#3050) and hashes the C/C++ input file
name (ClickHouse#2974).

Measured locally with CI's cmake flags and a local disk cache, second
build from a fresh build directory at the same path:
- amd_binary clickhouse-bundle: 1562 s cold, 147 s warm; C/C++ 17715 of
  17717 hits (the 2 misses are openldap's generated version files with
  __DATE__/__TIME__), Rust 603 of 603; no hit wrote a time trace.
- amd_asan_ubsan dbms: 1934 s cold, 95 s warm; C/C++ 16237 of 16239,
  Rust 529 of 529.
- PR-build environment (READ_ONLY, anonymous S3): the server starts, a
  miss compiles, the write is refused, warn_on_low_sccache_hit_rate
  parses the stats. 0.20.0 additionally counts an anonymous 403 on a
  missing key as a read error (ClickHouse#2967); it is still a miss.

0.20.0 treats `--embed-dir` as uncacheable, so the 4 _jieba sources
(6.9 s of compile) are always compiled. 0.20.0 does not read 0.17.0
entries: every build type is cold once after this lands.

Related: ClickHouse#127827

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

4 participants