Skip to content

Commit

Permalink
[profile] Enable testing Continuous mode on Linux (#121238)
Browse files Browse the repository at this point in the history
Based on #115987, with the introduction of `REQUIRES: continuous-mode`.
Also Linux assumes `runtime_reloc`.

FIXME: image-with-no-counters.c is still excluded.
  • Loading branch information
chapuni authored Dec 29, 2024
1 parent cb1ad98 commit de294c9
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion compiler-rt/test/profile/ContinuousSyncMode/basic.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// REQUIRES: target={{.*(darwin|aix).*}}
// REQUIRES: continuous-mode

// RUN: %clang_profgen_cont -fcoverage-mapping -o %t.exe %s
// RUN: echo "garbage" > %t.profraw
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/profile/ContinuousSyncMode/get-filename.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// REQUIRES: target={{.*(darwin|aix).*}}
// REQUIRES: continuous-mode

// RUN: %clang_pgogen_cont -o %t.exe %s
// RUN: env LLVM_PROFILE_FILE="%c%t.profraw" %run %t.exe %t.profraw
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// REQUIRES: target={{.*(darwin|aix).*}}
// REQUIRES: continuous-mode

// RUN: %clang_profgen_cont -fcoverage-mapping -fcoverage-mcdc -O3 -o %t.exe %s
// RUN: env LLVM_PROFILE_FILE="%c%t.profraw" %run %t.exe 3 3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// REQUIRES: target={{.*(darwin|aix).*}}
// REQUIRES: continuous-mode

// RUN: rm -f %t.profraw
// RUN: %clangxx_pgogen_cont -lpthread %s -o %t.exe -mllvm -disable-vp -fprofile-update=atomic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// REQUIRES: target={{.*(darwin|aix).*}}
// REQUIRES: continuous-mode

// Test the online merging mode (%m) along with continuous mode (%c).
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// REQUIRES: target={{.*(darwin|aix).*}}
// REQUIRES: continuous-mode

// RUN: rm -rf %t.dir && mkdir -p %t.dir
// RUN: %clang_pgogen_cont -o %t.exe %s
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/profile/ContinuousSyncMode/set-filename.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// REQUIRES: target={{.*(darwin|aix).*}}
// REQUIRES: continuous-mode

// RUN: %clang_pgogen_cont -o %t.exe %s
// RUN: env LLVM_PROFILE_FILE="%c%t.profraw" %run %t.exe %t.profraw %t.bad
Expand Down
5 changes: 4 additions & 1 deletion compiler-rt/test/profile/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def get_required_attr(config, attr_name):
target_is_msvc = bool(re.match(r".*-windows-msvc$", config.target_triple))

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

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

if config.have_curl:
config.available_features.add("curl")

if config.host_os in ("AIX", "Darwin", "Linux"):
config.available_features.add("continuous-mode")

0 comments on commit de294c9

Please sign in to comment.