Issue 204596
Summary [llvm-profdata] Debug info profile correlation mode does not seem to work on Darwin
Labels
Assignees
Reporter belyaevrd
    The issue may be reproduced with the code below:
```c
int main() {
  int a = 1, b = 0;
  return a && b;
}
```

```
$ clang -fprofile-instr-generate -fcoverage-mapping -mllvm --profile-correlate=debug-info -g test.c -o test
ld: warning: reducing alignment of section __DATA,__llvm_prf_bits from 0x4000 to 0x1000 because it exceeds segment maximum alignment
ld: warning: reducing alignment of section __DATA,__llvm_prf_cnts from 0x4000 to 0x1000 because it exceeds segment maximum alignment
ld: warning: reducing alignment of section __DATA,__llvm_prf_data from 0x4000 to 0x1000 because it exceeds segment maximum alignment
$ ./test
$ llvm-profdata merge default.profraw --debug-info=test -o default.profdata

error: test: unable to correlate profile: could not find any profile data metadata in correlated file
```

Clang version:
```
clang version 22.0.0
Target: x86_64-apple-darwin23.6.0
Thread model: posix
```
This issue is also reproduced on arm64 and older clang versions. 
The warnings do not appear on arm64 and seem unrelated to the error.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to