Lines Matching refs:ProfileFile
100 static FILE *ProfileFile = NULL; variable
101 static FILE *getProfileFile() { return ProfileFile; } in getProfileFile()
102 static void setProfileFile(FILE *File) { ProfileFile = File; } in setProfileFile()
192 static int getProfileFileSizeForMerging(FILE *ProfileFile, in getProfileFileSizeForMerging() argument
194 if (fseek(ProfileFile, 0L, SEEK_END) == -1) { in getProfileFileSizeForMerging()
199 *ProfileFileSize = ftell(ProfileFile); in getProfileFileSizeForMerging()
202 if (fseek(ProfileFile, 0L, SEEK_SET) == -1) { in getProfileFileSizeForMerging()
222 static int mmapProfileForMerging(FILE *ProfileFile, uint64_t ProfileFileSize, in mmapProfileForMerging() argument
225 fileno(ProfileFile), 0); in mmapProfileForMerging()
246 static int doProfileMerging(FILE *ProfileFile, int *MergeDone) { in doProfileMerging() argument
251 if (getProfileFileSizeForMerging(ProfileFile, &ProfileFileSize) == -1) in doProfileMerging()
260 if (mmapProfileForMerging(ProfileFile, ProfileFileSize, &ProfileBuffer) == -1) in doProfileMerging()
272 (void)COMPILER_RT_FTRUNCATE(ProfileFile, in doProfileMerging()
300 FILE *ProfileFile = NULL; in openFileForMerging() local
303 ProfileFile = getProfileFile(); in openFileForMerging()
304 if (ProfileFile) { in openFileForMerging()
305 lprofLockFileHandle(ProfileFile); in openFileForMerging()
308 ProfileFile = lprofOpenFileEx(ProfileFileName); in openFileForMerging()
310 if (!ProfileFile) in openFileForMerging()
313 rc = doProfileMerging(ProfileFile, MergeDone); in openFileForMerging()
314 if (rc || (!*MergeDone && COMPILER_RT_FTRUNCATE(ProfileFile, 0L)) || in openFileForMerging()
315 fseek(ProfileFile, 0L, SEEK_SET) == -1) { in openFileForMerging()
318 fclose(ProfileFile); in openFileForMerging()
321 return ProfileFile; in openFileForMerging()