Lines Matching full:profile
39 /* From where is profile name specified.
81 * the total number of profile data files shared by all the processes
85 * 2 profile data files. %1m is equivalent to %m. Also %m specifier
105 /* Get the sizes of various profile data sections. Taken from in mmapForContinuousMode()
224 * first profile file. */
231 /* Get the sizes of various profile data sections. Taken from in mmapForContinuousMode()
249 /* Map the profile. */ in mmapForContinuousMode()
250 char *Profile = (char *)mmap(NULL, FileSize, PROT_READ | PROT_WRITE, in mmapForContinuousMode() local
252 if (Profile == MAP_FAILED) { in mmapForContinuousMode()
253 PROF_ERR("Unable to mmap profile: %s\n", strerror(errno)); in mmapForContinuousMode()
256 /* Update the profile fields based on the current mapping. */ in mmapForContinuousMode()
258 (intptr_t)Profile - (uintptr_t)CountersBegin + FileOffsetToCounters; in mmapForContinuousMode()
361 /* Get the size of the profile file. If there are any errors, print the
362 * message under the assumption that the profile is being read for merging
368 PROF_ERR("Unable to merge profile data, unable to get size: %s\n", in getProfileFileSizeForMerging()
376 PROF_ERR("Unable to merge profile data, unable to rewind: %s\n", in getProfileFileSizeForMerging()
383 PROF_WARN("Unable to merge profile data: %s\n", in getProfileFileSizeForMerging()
384 "source profile file is too small."); in getProfileFileSizeForMerging()
390 /* mmap() \p ProfileFile for profile merging purposes, assuming that an
400 PROF_ERR("Unable to merge profile data, mmap failed: %s\n", in mmapProfileForMerging()
407 PROF_WARN("Unable to merge profile data: %s\n", in mmapProfileForMerging()
408 "source profile file is not compatible."); in mmapProfileForMerging()
414 /* Read profile data in \c ProfileFile and merge with in-memory
415 profile counters. Returns -1 if there is fatal error, otheriwse
423 /* Get the size of the profile on disk. */ in doProfileMerging()
431 /* mmap() the profile and check that it is compatible with the data in in doProfileMerging()
438 PROF_ERR("%s\n", "Invalid profile data to merge"); in doProfileMerging()
443 // Truncate the file in case merging of value profile did not happen to in doProfileMerging()
444 // prevent from leaving garbage data at the end of the profile file. in doProfileMerging()
464 /* Open the profile data for merging. It opens the file in r+b mode with
466 * current process, it also reads in the profile data in the file and merge
467 * it with in-memory counters. After the profile data is merged in memory,
468 * the original profile data is truncated and gets ready for the profile
469 * dumper. With profile merging enabled, each executable as well as any of
470 * its instrumented shared libraries dump profile data into their own data file.
475 // initializeProfileForContinuousMode will lock the profile, but if in openFileForMerging()
491 PROF_ERR("Profile Merging of file %s failed: %s\n", ProfileFileName, in openFileForMerging()
509 /* Write profile data to file \c OutputName. */
577 /* Only create the profile directory and truncate an existing profile once. in truncateCurrentFile()
578 * In continuous mode, this is necessary, as the profile is written-to by the in truncateCurrentFile()
589 /* Create the profile dir (even if online merging is enabled), so that in truncateCurrentFile()
590 * the profile file can be set up if continuous mode is enabled. */ in truncateCurrentFile()
593 /* By pass file truncation to allow online raw profile merging. */ in truncateCurrentFile()
604 /* Write a partial profile to \p Filename, which is required to be backed by
641 * the profile, i.e. into each participating process. An increment in one in initializeProfileForContinuousMode()
655 /* Grow the profile so that mmap() can succeed. Leak the file handle, as in initializeProfileForContinuousMode()
663 /* The merged profile has a non-zero length. Check that it is compatible in initializeProfileForContinuousMode()
681 PROF_ERR("Continuous counter sync mode is enabled, but raw profile is not" in initializeProfileForContinuousMode()
693 /* mmap() the profile counters so long as there is at least one counter. in initializeProfileForContinuousMode()
864 /* The old profile name specifier takes precedence over the old one. */ in parseAndSetFilename()
883 PROF_NOTE("Set profile file path to \"%s\" via %s.\n", in parseAndSetFilename()
887 PROF_NOTE("Override old profile path \"%s\" via %s to \"%s\" via %s.\n", in parseAndSetFilename()
897 /* Return buffer length that is required to store the current profile
919 /* Return the pointer to the current profile file name (after substituting
1040 * profile path via -fprofile-instr-generate= and LLVM_PROFILE_FILE
1088 /* The public API for writing profile data into the file with name
1102 PROF_NOTE("Profile data not written to file: %s.\n", "already written"); in __llvm_profile_write_file()
1131 /* Write profile data to the file. */ in __llvm_profile_write_file()
1147 " of previously dumped profile data : %s. Either use %%m " in __llvm_profile_dump()
1148 "in profile name or change profile name before dumping.\n", in __llvm_profile_dump()
1149 "online profile merging is not on"); in __llvm_profile_dump()
1239 PROF_WARN("Data may be corrupted during profile merging : %s\n", in __llvm_profile_set_file_object()
1260 /* The merged profile has a non-zero length. Check that it is compatible in __llvm_profile_set_file_object()