projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8604651
)
[Profile] Add a warning when lock file failed in __llvm_profile_set_file_object with...
author
Zequan Wu
<zequanwu@google.com>
Fri, 1 Oct 2021 21:37:09 +0000
(14:37 -0700)
committer
Zequan Wu
<zequanwu@google.com>
Fri, 1 Oct 2021 21:37:09 +0000
(14:37 -0700)
compiler-rt/lib/profile/InstrProfilingFile.c
patch
|
blob
|
history
diff --git
a/compiler-rt/lib/profile/InstrProfilingFile.c
b/compiler-rt/lib/profile/InstrProfilingFile.c
index
2070f93
..
e830d36
100644
(file)
--- a/
compiler-rt/lib/profile/InstrProfilingFile.c
+++ b/
compiler-rt/lib/profile/InstrProfilingFile.c
@@
-1153,7
+1153,10
@@
COMPILER_RT_VISIBILITY int __llvm_profile_set_file_object(FILE *File,
fileno(File));
return 1;
}
- lprofLockFileHandle(File);
+ if (lprofLockFileHandle(File) != 0) {
+ PROF_WARN("Data may be corrupted during profile merging : %s\n",
+ "Fail to obtain file lock due to system limit.");
+ }
uint64_t ProfileFileSize = 0;
if (getProfileFileSizeForMerging(File, &ProfileFileSize) == -1) {
lprofUnlockFileHandle(File);