aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorWael Yehia <wmyehia2001@yahoo.com>2025-03-18 14:13:15 -0400
committerWael Yehia <wyehia@ca.ibm.com>2025-03-20 17:34:34 +0000
commite202ff45df206859b6e3c2142a735348a0d449bb (patch)
tree6d80f32825c340d7ab800e2b4b7dce16bc0215ee /clang/lib/CodeGen/CodeGenModule.cpp
parent5f6d9b45e90a261810e347a7de092545dbb46fc6 (diff)
downloadllvm-e202ff45df206859b6e3c2142a735348a0d449bb.zip
llvm-e202ff45df206859b6e3c2142a735348a0d449bb.tar.gz
llvm-e202ff45df206859b6e3c2142a735348a0d449bb.tar.bz2
[profile] Implement a non-mmap path when reading profile files from a non-local filesystem (#131177)
On AIX, when accessing mmap'ed memory associated to a file on NFS, a SIGBUS might be raised at random. The problem is still in open state with the OS team. This PR teaches the profile runtime, under certain conditions, to avoid the mmap when reading the profile file during online merging. This PR has no effect on any platform other than AIX because I'm not aware of this problem on other platforms. Other platforms can easily opt-in to this functionality in the future. The logic in function `is_local_filesystem` was copied from [llvm/lib/Support/Unix/Path.inc](https://github.com/llvm/llvm-project/blob/f388ca3d9d9a58e3d189458b590ba68dfd9e5a2d/llvm/lib/Support/Unix/Path.inc#L515) (https://reviews.llvm.org/D58801), because it seems that the compiler-rt/profile cannot reuse code from llvm except through `InstrProfData.inc`. Thanks to @hubert-reinterpretcast for substantial feedback downstream. --------- Co-authored-by: Wael Yehia <wyehia@ca.ibm.com> Co-authored-by: Hubert Tong <hubert.reinterpretcast@gmail.com>
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions