Lines Matching refs:ProfileFile
95 static int getProfileFileSizeForMerging(FILE *ProfileFile,
239 static FILE *ProfileFile = NULL; variable
240 static FILE *getProfileFile(void) { return ProfileFile; } in getProfileFile()
241 static void setProfileFile(FILE *File) { ProfileFile = File; } in setProfileFile()
319 static int getProfileFileSizeForMerging(FILE *ProfileFile, in getProfileFileSizeForMerging() argument
321 if (fseek(ProfileFile, 0L, SEEK_END) == -1) { in getProfileFileSizeForMerging()
326 *ProfileFileSize = ftell(ProfileFile); in getProfileFileSizeForMerging()
329 if (fseek(ProfileFile, 0L, SEEK_SET) == -1) { in getProfileFileSizeForMerging()
349 static int mmapProfileForMerging(FILE *ProfileFile, uint64_t ProfileFileSize, in mmapProfileForMerging() argument
352 fileno(ProfileFile), 0); in mmapProfileForMerging()
373 static int doProfileMerging(FILE *ProfileFile, int *MergeDone) { in doProfileMerging() argument
378 if (getProfileFileSizeForMerging(ProfileFile, &ProfileFileSize) == -1) in doProfileMerging()
387 if (mmapProfileForMerging(ProfileFile, ProfileFileSize, &ProfileBuffer) == -1) in doProfileMerging()
399 (void)COMPILER_RT_FTRUNCATE(ProfileFile, in doProfileMerging()
427 FILE *ProfileFile = NULL; in openFileForMerging() local
430 ProfileFile = getProfileFile(); in openFileForMerging()
431 if (ProfileFile) { in openFileForMerging()
432 lprofLockFileHandle(ProfileFile); in openFileForMerging()
435 ProfileFile = lprofOpenFileEx(ProfileFileName); in openFileForMerging()
437 if (!ProfileFile) in openFileForMerging()
440 rc = doProfileMerging(ProfileFile, MergeDone); in openFileForMerging()
441 if (rc || (!*MergeDone && COMPILER_RT_FTRUNCATE(ProfileFile, 0L)) || in openFileForMerging()
442 fseek(ProfileFile, 0L, SEEK_SET) == -1) { in openFileForMerging()
445 fclose(ProfileFile); in openFileForMerging()
448 return ProfileFile; in openFileForMerging()