Skip to content

Commit a499b7b

Browse files
Wael Yehiapuja2196
authored andcommitted
[AIX][PGO] Enable PGO continuous mode support on AIX (#110196)
1 parent a505e94 commit a499b7b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

compiler-rt/lib/profile/InstrProfilingFile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ static int mmapForContinuousMode(uint64_t CurrentFileOffset, FILE *File) {
196196
}
197197
return 0;
198198
}
199-
#elif defined(__ELF__) || defined(_WIN32)
199+
#elif defined(__ELF__) || defined(_WIN32) || defined(_AIX)
200200

201201
#define INSTR_PROF_PROFILE_COUNTER_BIAS_DEFAULT_VAR \
202202
INSTR_PROF_CONCAT(INSTR_PROF_PROFILE_COUNTER_BIAS_VAR, _default)
@@ -862,7 +862,7 @@ static int parseFilenamePattern(const char *FilenamePat,
862862
__llvm_profile_disable_continuous_mode();
863863
return -1;
864864
}
865-
#if defined(__APPLE__) || defined(__ELF__) || defined(_WIN32)
865+
#if defined(__APPLE__) || defined(__ELF__) || defined(_WIN32) || defined(_AIX)
866866
__llvm_profile_set_page_size(getpagesize());
867867
__llvm_profile_enable_continuous_mode();
868868
#else

compiler-rt/test/profile/ContinuousSyncMode/runtime-counter-relocation.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// REQUIRES: target={{.*(linux|solaris|windows-msvc).*}}
1+
// REQUIRES: target={{.*(linux|solaris|windows-msvc|aix).*}}
22

33
// RUN: %clang -fprofile-instr-generate -fcoverage-mapping -mllvm -runtime-counter-relocation=true -o %t.exe %s
44
// RUN: echo "garbage" > %t.profraw
55
// RUN: env LLVM_PROFILE_FILE="%c%t.profraw" %run %t.exe
66
// RUN: llvm-profdata show --counts --all-functions %t.profraw | FileCheck %s -check-prefix=CHECK-COUNTS
77
// RUN: llvm-profdata merge -o %t.profdata %t.profraw
8-
// RUN: llvm-cov report %t.exe -instr-profile %t.profdata | FileCheck %s -check-prefix=CHECK-COVERAGE
8+
// RUN: %if !target={{.*aix.*}} %{ llvm-cov report %t.exe -instr-profile %t.profdata | FileCheck %s -check-prefix=CHECK-COVERAGE %}
99

1010
// CHECK-COUNTS: Counters:
1111
// CHECK-COUNTS-NEXT: main:

compiler-rt/test/profile/ContinuousSyncMode/set-file-object.c

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

33
// Test using __llvm_profile_set_file_object in continuous mode (%c).
44
// Create & cd into a temporary directory.

0 commit comments

Comments
 (0)