-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[Coverage] Support -fprofile-list for cold function coverage #136333
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ | |
// RUN: echo -e "[clang]\nfun:test1\n[llvm]\nfun:test2" > %t-section.list | ||
// RUN: %clang_cc1 -fprofile-instrument=llvm -fprofile-list=%t-section.list -emit-llvm %s -o - | FileCheck %s --check-prefix=SECTION | ||
|
||
// RUN: echo -e "[coldcov]\nfun:test*\n!fun:test2" > %t-cold-func.list | ||
// RUN: %clang_cc1 -fprofile-instrument=coldcov -fprofile-list=%t-cold-func.list -emit-llvm %s -o - | FileCheck %s --check-prefix=COLDCOV | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know the rest of the test uses There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. improved the test with |
||
// RUN: echo -e "fun:test*\n!fun:test1" > %t-exclude.list | ||
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -fprofile-list=%t-exclude.list -emit-llvm %s -o - | FileCheck %s --check-prefix=EXCLUDE | ||
|
||
|
@@ -36,6 +39,8 @@ unsigned i; | |
// SECTION: @test1 | ||
// EXCLUDE: noprofile | ||
// EXCLUDE: @test1 | ||
// COLDCOV-NOT: noprofile | ||
// COLDCOV: @test1 | ||
unsigned test1(void) { | ||
// CHECK: %pgocount = load i64, ptr @__profc_{{_?}}test1 | ||
// FUNC: %pgocount = load i64, ptr @__profc_{{_?}}test1 | ||
|
@@ -55,6 +60,8 @@ unsigned test1(void) { | |
// SECTION: @test2 | ||
// EXCLUDE-NOT: noprofile | ||
// EXCLUDE: @test2 | ||
// COLDCOV: noprofile | ||
// COLDCOV: @test2 | ||
unsigned test2(void) { | ||
// CHECK: %pgocount = load i64, ptr @__profc_{{_?}}test2 | ||
// FUNC-NOT: %pgocount = load i64, ptr @__profc_{{_?}}test2 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do this to avoid the
CHECK-NOT
lines?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also a explicit check noprofile ("// COLDCOV: noprofile"), so I guess
implicit-check-not
doesn't work here.