Skip to content

Commit de294c9

Browse files
authored
[profile] Enable testing Continuous mode on Linux (#121238)
Based on #115987, with the introduction of `REQUIRES: continuous-mode`. Also Linux assumes `runtime_reloc`. FIXME: image-with-no-counters.c is still excluded.
1 parent cb1ad98 commit de294c9

File tree

8 files changed

+11
-8
lines changed

8 files changed

+11
-8
lines changed

compiler-rt/test/profile/ContinuousSyncMode/basic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: target={{.*(darwin|aix).*}}
1+
// REQUIRES: continuous-mode
22

33
// RUN: %clang_profgen_cont -fcoverage-mapping -o %t.exe %s
44
// RUN: echo "garbage" > %t.profraw

compiler-rt/test/profile/ContinuousSyncMode/get-filename.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: target={{.*(darwin|aix).*}}
1+
// REQUIRES: continuous-mode
22

33
// RUN: %clang_pgogen_cont -o %t.exe %s
44
// RUN: env LLVM_PROFILE_FILE="%c%t.profraw" %run %t.exe %t.profraw

compiler-rt/test/profile/ContinuousSyncMode/image-with-mcdc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: target={{.*(darwin|aix).*}}
1+
// REQUIRES: continuous-mode
22

33
// RUN: %clang_profgen_cont -fcoverage-mapping -fcoverage-mcdc -O3 -o %t.exe %s
44
// RUN: env LLVM_PROFILE_FILE="%c%t.profraw" %run %t.exe 3 3

compiler-rt/test/profile/ContinuousSyncMode/multi-threaded.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: target={{.*(darwin|aix).*}}
1+
// REQUIRES: continuous-mode
22

33
// RUN: rm -f %t.profraw
44
// RUN: %clangxx_pgogen_cont -lpthread %s -o %t.exe -mllvm -disable-vp -fprofile-update=atomic

compiler-rt/test/profile/ContinuousSyncMode/online-merging.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: target={{.*(darwin|aix).*}}
1+
// REQUIRES: continuous-mode
22

33
// Test the online merging mode (%m) along with continuous mode (%c).
44
//

compiler-rt/test/profile/ContinuousSyncMode/pid-substitution.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: target={{.*(darwin|aix).*}}
1+
// REQUIRES: continuous-mode
22

33
// RUN: rm -rf %t.dir && mkdir -p %t.dir
44
// RUN: %clang_pgogen_cont -o %t.exe %s

compiler-rt/test/profile/ContinuousSyncMode/set-filename.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: target={{.*(darwin|aix).*}}
1+
// REQUIRES: continuous-mode
22

33
// RUN: %clang_pgogen_cont -o %t.exe %s
44
// RUN: env LLVM_PROFILE_FILE="%c%t.profraw" %run %t.exe %t.profraw %t.bad

compiler-rt/test/profile/lit.cfg.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def get_required_attr(config, attr_name):
3131
target_is_msvc = bool(re.match(r".*-windows-msvc$", config.target_triple))
3232

3333
# Whether continous profile collection (%c) requires runtime counter relocation on this platform
34-
runtime_reloc = bool(config.host_os in ["AIX"])
34+
runtime_reloc = bool(config.host_os in ["AIX", "Linux"])
3535

3636
if config.host_os in ["Linux"]:
3737
extra_link_flags = ["-ldl"]
@@ -210,3 +210,6 @@ def exclude_unsupported_files_for_aix(dirname):
210210

211211
if config.have_curl:
212212
config.available_features.add("curl")
213+
214+
if config.host_os in ("AIX", "Darwin", "Linux"):
215+
config.available_features.add("continuous-mode")

0 commit comments

Comments
 (0)