Lines Matching refs:ProfileFile

99 static FILE *ProfileFile = NULL;  variable
100 static FILE *getProfileFile() { return ProfileFile; } in getProfileFile()
101 static void setProfileFile(FILE *File) { ProfileFile = File; } in setProfileFile()
191 static int getProfileFileSizeForMerging(FILE *ProfileFile, in getProfileFileSizeForMerging() argument
193 if (fseek(ProfileFile, 0L, SEEK_END) == -1) { in getProfileFileSizeForMerging()
198 *ProfileFileSize = ftell(ProfileFile); in getProfileFileSizeForMerging()
201 if (fseek(ProfileFile, 0L, SEEK_SET) == -1) { in getProfileFileSizeForMerging()
221 static int mmapProfileForMerging(FILE *ProfileFile, uint64_t ProfileFileSize, in mmapProfileForMerging() argument
224 fileno(ProfileFile), 0); in mmapProfileForMerging()
245 static int doProfileMerging(FILE *ProfileFile, int *MergeDone) { in doProfileMerging() argument
250 if (getProfileFileSizeForMerging(ProfileFile, &ProfileFileSize) == -1) in doProfileMerging()
259 if (mmapProfileForMerging(ProfileFile, ProfileFileSize, &ProfileBuffer) == -1) in doProfileMerging()
267 COMPILER_RT_FTRUNCATE(ProfileFile, __llvm_profile_get_size_for_buffer()); in doProfileMerging()
294 FILE *ProfileFile = NULL; in openFileForMerging() local
297 ProfileFile = getProfileFile(); in openFileForMerging()
298 if (ProfileFile) { in openFileForMerging()
299 lprofLockFileHandle(ProfileFile); in openFileForMerging()
302 ProfileFile = lprofOpenFileEx(ProfileFileName); in openFileForMerging()
304 if (!ProfileFile) in openFileForMerging()
307 rc = doProfileMerging(ProfileFile, MergeDone); in openFileForMerging()
308 if (rc || (!*MergeDone && COMPILER_RT_FTRUNCATE(ProfileFile, 0L)) || in openFileForMerging()
309 fseek(ProfileFile, 0L, SEEK_SET) == -1) { in openFileForMerging()
312 fclose(ProfileFile); in openFileForMerging()
315 return ProfileFile; in openFileForMerging()