-
Notifications
You must be signed in to change notification settings - Fork 14.6k
[PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX #108570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e1b5e88
Initial commit.
7c6b1d7
Special code for AIX only.
258103e
Fix lit test.
b1eaf18
Improve new test.
11793f3
Address review comments.
b7c470a
Fix the code that inserts the .ref pseudo-op when xcoff-roptr is in e…
9c8505c
Address code review.
d5fc314
Address review comments.
426caab
Address code review comments.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// The undefined symbol should not cause link errors, and we should | ||
// obtain the expected coverage report. | ||
|
||
// Test the --coverage option. | ||
RUN: rm -rf %t0 && split-file %s %t0 && cd %t0 | ||
RUN: %clang bar.c main.c undef.c --coverage -c | ||
RUN: ar -X32_64 -rv libfoo.a undef.o bar.o | ||
RUN: %clang main.o -L. -lfoo --coverage -o main.exe | ||
RUN: %run ./main.exe | ||
RUN: llvm-cov gcov -t main.gcda | FileCheck --check-prefix=MAIN %s | ||
RUN: llvm-cov gcov -t bar.gcda | FileCheck --check-prefix=BAR %s | ||
|
||
// Test the pgogen -fprofile-arcs -ftest-coverage option combination. | ||
RUN: rm -rf %t1 && split-file %s %t1 && cd %t1 | ||
RUN: %clang_pgogen bar.c main.c undef.c -fprofile-arcs -ftest-coverage -c | ||
RUN: ar -X32_64 -rv libfoo.a undef.o bar.o | ||
RUN: %clang_pgogen main.o -L. -lfoo -fprofile-generate -fprofile-arcs -ftest-coverage -o main.exe | ||
RUN: %run ./main.exe | ||
RUN: llvm-cov gcov -t main.gcda | FileCheck --check-prefix=MAIN %s | ||
RUN: llvm-cov gcov -t bar.gcda | FileCheck --check-prefix=BAR %s | ||
|
||
// Test the pgogen -Wl,-bcdtors:mbr option combination. | ||
RUN: rm -rf %t2 && split-file %s %t2 && cd %t2 | ||
RUN: %clang_pgogen bar.c main.c undef.c -fprofile-arcs -ftest-coverage -c | ||
RUN: ar -X32_64 -rv libfoo.a undef.o bar.o | ||
RUN: %clang_pgogen main.o -L. -lfoo -fprofile-generate -fprofile-arcs -ftest-coverage -Wl,-bcdtors:mbr -o main.exe | ||
RUN: %run ./main.exe | ||
RUN: llvm-cov gcov -t main.gcda | FileCheck --check-prefix=MAIN %s | ||
RUN: llvm-cov gcov -t bar.gcda | FileCheck --check-prefix=BAR %s | ||
|
||
MAIN: 1: 2:int main() { | ||
MAIN: 1: 3: return bar(); | ||
BAR: 1: 1:int bar() { | ||
BAR: 1: 2: return 0; | ||
|
||
//--- main.c | ||
int bar(); | ||
int main() { | ||
return bar(); | ||
} | ||
|
||
|
||
//--- bar.c | ||
int bar() { | ||
return 0; | ||
} | ||
|
||
//--- undef.c | ||
void undef_func(); | ||
void foo() { | ||
undef_func(); | ||
} |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.