Skip to content

Add LLVM Source-based Code Coverage Support#959

Merged
hnwyllmm merged 2 commits into
masterfrom
task/2026062300116930662
Jul 9, 2026
Merged

Add LLVM Source-based Code Coverage Support#959
hnwyllmm merged 2 commits into
masterfrom
task/2026062300116930662

Conversation

@hnwyllmm

@hnwyllmm hnwyllmm commented Jul 1, 2026

Copy link
Copy Markdown
Member

Task Description

Add LLVM source-based code coverage support in seekdb.

Solution Description

Passed Regressions

Upgrade Compatibility

Other Information

  • Related internal link: DIMA-2026062300116930662

Release Note

@hnwyllmm

hnwyllmm commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

The mapping Dima issue is about integrating clang source-based code coverage into seekdb.

hnwyllmm added 2 commits July 7, 2026 18:40
…e constructor

Replace the setenv LLVM_PROFILE_FILE call in constructor(101) with a direct
__llvm_profile_set_filename. Both run before the profile runtime's initializer
so the runtime opens <base_dir>/seekdb.profraw (continuous) from the start and
never creates default.profraw. Verified on the observer: continuous seekdb.profraw
in the base dir, no default.profraw.
@hnwyllmm hnwyllmm force-pushed the task/2026062300116930662 branch from 824dc21 to 7b678e7 Compare July 9, 2026 06:19
@hnwyllmm hnwyllmm merged commit ff10487 into oceanbase:master Jul 9, 2026
2 checks passed
@hnwyllmm hnwyllmm deleted the task/2026062300116930662 branch July 9, 2026 06:20
@footka

footka commented Jul 9, 2026

Copy link
Copy Markdown
Member

src/observer/main.cpp:30

Why not just call __llvm_profile_set_filename(base_dir) directly?

@hnwyllmm

hnwyllmm commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

src/observer/main.cpp:30

Calling __llvm_profile_set_filename and setting the LLVM_PROFILE_FILE environment variable achieve the same end result. __llvm_profile_set_filename directly sets the output path for the profraw file, whereas using LLVM_PROFILE_FILE means the profile runtime initializer reads this environment variable to set the path later during initialization. The code has been changed to use __llvm_profile_set_filename.

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.

2 participants