Lines Matching refs:lprofCurFilename
90 static lprofFilename lprofCurFilename = {0, 0, 0, {0}, NULL, variable
118 return lprofCurFilename.MergePoolSize || isProfileMergeRequested(); in doMerging()
413 if (lprofCurFilename.MergePoolSize) in truncateCurrentFile()
676 if (lprofCurFilename.FilenamePat && lprofCurFilename.OwnsFilenamePat) { in resetFilenameToDefault()
677 free((void *)lprofCurFilename.FilenamePat); in resetFilenameToDefault()
679 memset(&lprofCurFilename, 0, sizeof(lprofCurFilename)); in resetFilenameToDefault()
680 lprofCurFilename.FilenamePat = DefaultProfileName; in resetFilenameToDefault()
681 lprofCurFilename.PNS = PNS_default; in resetFilenameToDefault()
707 char *PidChars = &lprofCurFilename.PidChars[0]; in parseFilenamePattern()
708 char *Hostname = &lprofCurFilename.Hostname[0]; in parseFilenamePattern()
712 if (lprofCurFilename.ProfilePathPrefix) in parseFilenamePattern()
713 free((void *)lprofCurFilename.ProfilePathPrefix); in parseFilenamePattern()
715 if (lprofCurFilename.FilenamePat && lprofCurFilename.OwnsFilenamePat) { in parseFilenamePattern()
716 free((void *)lprofCurFilename.FilenamePat); in parseFilenamePattern()
719 memset(&lprofCurFilename, 0, sizeof(lprofCurFilename)); in parseFilenamePattern()
722 lprofCurFilename.FilenamePat = FilenamePat; in parseFilenamePattern()
724 lprofCurFilename.FilenamePat = strdup(FilenamePat); in parseFilenamePattern()
725 lprofCurFilename.OwnsFilenamePat = 1; in parseFilenamePattern()
748 lprofCurFilename.TmpDir = getenv("TMPDIR"); in parseFilenamePattern()
749 if (!lprofCurFilename.TmpDir) { in parseFilenamePattern()
775 lprofCurFilename.MergePoolSize = MergePoolSize; in parseFilenamePattern()
779 lprofCurFilename.NumPids = NumPids; in parseFilenamePattern()
780 lprofCurFilename.NumHosts = NumHosts; in parseFilenamePattern()
788 const char *OldFilenamePat = lprofCurFilename.FilenamePat; in parseAndSetFilename()
789 ProfileNameSpecifier OldPNS = lprofCurFilename.PNS; in parseAndSetFilename()
799 lprofCurFilename.PNS = PNS; in parseAndSetFilename()
806 lprofCurFilename.PNS = PNS; in parseAndSetFilename()
811 lprofCurFilename.FilenamePat, getPNSStr(PNS)); in parseAndSetFilename()
815 OldFilenamePat, getPNSStr(OldPNS), lprofCurFilename.FilenamePat, in parseAndSetFilename()
834 if (!lprofCurFilename.FilenamePat || !lprofCurFilename.FilenamePat[0]) in getCurFilenameLength()
837 if (!(lprofCurFilename.NumPids || lprofCurFilename.NumHosts || in getCurFilenameLength()
838 lprofCurFilename.TmpDir || lprofCurFilename.MergePoolSize)) in getCurFilenameLength()
839 return strlen(lprofCurFilename.FilenamePat); in getCurFilenameLength()
841 Len = strlen(lprofCurFilename.FilenamePat) + in getCurFilenameLength()
842 lprofCurFilename.NumPids * (strlen(lprofCurFilename.PidChars) - 2) + in getCurFilenameLength()
843 lprofCurFilename.NumHosts * (strlen(lprofCurFilename.Hostname) - 2) + in getCurFilenameLength()
844 (lprofCurFilename.TmpDir ? (strlen(lprofCurFilename.TmpDir) - 1) : 0); in getCurFilenameLength()
845 if (lprofCurFilename.MergePoolSize) in getCurFilenameLength()
857 const char *FilenamePat = lprofCurFilename.FilenamePat; in getCurFilename()
859 if (!lprofCurFilename.FilenamePat || !lprofCurFilename.FilenamePat[0]) in getCurFilename()
862 if (!(lprofCurFilename.NumPids || lprofCurFilename.NumHosts || in getCurFilename()
863 lprofCurFilename.TmpDir || lprofCurFilename.MergePoolSize || in getCurFilename()
866 return lprofCurFilename.FilenamePat; in getCurFilename()
868 FilenamePatLength = strlen(lprofCurFilename.FilenamePat); in getCurFilename()
869 memcpy(FilenameBuf, lprofCurFilename.FilenamePat, FilenamePatLength); in getCurFilename()
874 PidLength = strlen(lprofCurFilename.PidChars); in getCurFilename()
875 HostNameLength = strlen(lprofCurFilename.Hostname); in getCurFilename()
876 TmpDirLength = lprofCurFilename.TmpDir ? strlen(lprofCurFilename.TmpDir) : 0; in getCurFilename()
881 memcpy(FilenameBuf + J, lprofCurFilename.PidChars, PidLength); in getCurFilename()
884 memcpy(FilenameBuf + J, lprofCurFilename.Hostname, HostNameLength); in getCurFilename()
887 memcpy(FilenameBuf + J, lprofCurFilename.TmpDir, TmpDirLength); in getCurFilename()
895 int ProfilePoolId = getpid() % lprofCurFilename.MergePoolSize; in getCurFilename()
926 if (lprofCurFilename.ProfilePathPrefix) in __llvm_profile_get_path_prefix()
927 return lprofCurFilename.ProfilePathPrefix; in __llvm_profile_get_path_prefix()
947 lprofCurFilename.ProfilePathPrefix = Prefix; in __llvm_profile_get_path_prefix()