Lines Matching +full:non +full:- +full:continuous

1 /*===- InstrProfilingFile.c - Write instrumentation to a file -------------===*\
5 |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 \*===----------------------------------------------------------------------===*/
41 * precedence. Re-order them may lead to
80 /* When in-process merging is enabled, this parameter specifies
84 * by the %[0-9]m specifier. For instance %2m enables merging using
115 const uint64_t NamesSize = (NamesEnd - NamesBegin) * sizeof(char);
123 * page-aligned. */
126 PROF_ERR("Counters section not page-aligned (start = %p, pagesz = %u).\n",
131 PROF_ERR("Bitmap section not page-aligned (start = %p, pagesz = %u).\n",
136 PROF_ERR("Data section not page-aligned (start = %p, pagesz = %u).\n",
162 "Continuous counter sync mode is enabled, but mmap() failed (%s).\n"
163 " - CountersBegin: %p\n"
164 " - PageAlignedCountersLength: %" PRIu64 "\n"
165 " - Fileno: %d\n"
166 " - FileOffsetToCounters: %" PRIu64 "\n",
186 "Continuous counter sync mode is enabled, but mmap() failed (%s).\n"
187 " - BitmapBegin: %p\n"
188 " - PageAlignedBitmapLength: %" PRIu64 "\n"
189 " - Fileno: %d\n"
190 " - FileOffsetToBitmap: %" PRIu64 "\n",
258 (intptr_t)Profile - (uintptr_t)CountersBegin + FileOffsetToCounters;
299 FILE *File = (FILE *)This->WriterCtx;
315 BytesToWrite -= PartialWriteLen;
318 if (fseek(File, IOVecs[I].ElmSize * IOVecs[I].NumElm, SEEK_CUR) == -1)
335 This->Write = fileWriter;
336 This->WriterCtx = File;
348 IO->OwnFileWriter = 1;
363 * purposes, and return -1. Otherwise return the file size in the inout param
367 if (fseek(ProfileFile, 0L, SEEK_END) == -1) {
370 return -1;
375 if (fseek(ProfileFile, 0L, SEEK_SET) == -1) {
378 return -1;
385 return -1;
393 * \p ProfileBuffer. Returns -1 on failure. On success, the caller is
402 return -1;
409 return -1;
414 /* Read profile data in \c ProfileFile and merge with in-memory
415 profile counters. Returns -1 if there is fatal error, otheriwse
424 if (getProfileFileSizeForMerging(ProfileFile, &ProfileFileSize) == -1)
425 return -1;
433 if (mmapProfileForMerging(ProfileFile, ProfileFileSize, &ProfileBuffer) == -1)
434 return -1;
440 return -1;
467 * it with in-memory counters. After the profile data is merged in memory,
490 fseek(ProfileFile, 0L, SEEK_SET) == -1) {
522 return -1;
551 return -1;
578 * In continuous mode, this is necessary, as the profile is written-to by the
590 * the profile file can be set up if continuous mode is enabled. */
619 PROF_ERR("%s\n", "continuous mode is unsupported on this platform");
649 if (getProfileFileSizeForMerging(File, &ProfileFileSize) == -1) {
663 /* The merged profile has a non-zero length. Check that it is compatible
666 if (mmapProfileForMerging(File, ProfileFileSize, &ProfileBuffer) == -1) {
677 /* Check that the offset within the file is page-aligned. */
681 PROF_ERR("Continuous counter sync mode is enabled, but raw profile is not"
682 "page-aligned. CurrentFileOffset = %" PRIu64 ", pagesz = %u.\n",
711 #pragma GCC diagnostic ignored "-Wcast-qual"
714 #pragma clang diagnostic ignored "-Wcast-qual"
738 Num = Num * 10 + C - '0';
741 * to be in-bound as the string is null terminated. */
765 #pragma GCC diagnostic ignored "-Wcast-qual"
768 #pragma clang diagnostic ignored "-Wcast-qual"
791 /* Check the filename for "%p", which indicates a pid-substitution. */
803 return -1;
812 return -1;
820 return -1;
827 return -1;
833 PROF_WARN("%s", "Continous mode is currently only supported for Mach-O,"
835 return -1;
844 return -1;
911 lprofCurFilename.NumPids * (strlen(lprofCurFilename.PidChars) - 2) +
912 lprofCurFilename.NumHosts * (strlen(lprofCurFilename.Hostname) - 2) +
913 (lprofCurFilename.TmpDir ? (strlen(lprofCurFilename.TmpDir) - 1) : 0);
967 if (S == -1 || S > SIGLEN)
1008 Length = PrefixEnd - Filename + 1;
1040 * profile path via -fprofile-instr-generate= and LLVM_PROFILE_FILE
1079 * and command line option -fprofile-instr-generate=<profile_name>.
1117 return -1;
1128 return -1;
1177 return -1;
1193 return -1;
1234 "continuous sync mode when merging is disabled\n",
1243 if (getProfileFileSizeForMerging(File, &ProfileFileSize) == -1) {
1260 /* The merged profile has a non-zero length. Check that it is compatible
1263 if (mmapProfileForMerging(File, ProfileFileSize, &ProfileBuffer) == -1) {