reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

projects/compiler-rt/lib/profile/InstrProfilingFile.c
  110   return lprofCurFilename.MergePoolSize || isProfileMergeRequested();
  347   if (lprofCurFilename.MergePoolSize)
  361   if (lprofCurFilename.FilenamePat && lprofCurFilename.OwnsFilenamePat) {
  361   if (lprofCurFilename.FilenamePat && lprofCurFilename.OwnsFilenamePat) {
  362     free((void *)lprofCurFilename.FilenamePat);
  364   memset(&lprofCurFilename, 0, sizeof(lprofCurFilename));
  364   memset(&lprofCurFilename, 0, sizeof(lprofCurFilename));
  365   lprofCurFilename.FilenamePat = DefaultProfileName;
  366   lprofCurFilename.PNS = PNS_default;
  382   char *PidChars = &lprofCurFilename.PidChars[0];
  383   char *Hostname = &lprofCurFilename.Hostname[0];
  387   if (lprofCurFilename.ProfilePathPrefix)
  388     free((void *)lprofCurFilename.ProfilePathPrefix);
  390   if (lprofCurFilename.FilenamePat && lprofCurFilename.OwnsFilenamePat) {
  390   if (lprofCurFilename.FilenamePat && lprofCurFilename.OwnsFilenamePat) {
  391     free((void *)lprofCurFilename.FilenamePat);
  394   memset(&lprofCurFilename, 0, sizeof(lprofCurFilename));
  394   memset(&lprofCurFilename, 0, sizeof(lprofCurFilename));
  397     lprofCurFilename.FilenamePat = FilenamePat;
  399     lprofCurFilename.FilenamePat = strdup(FilenamePat);
  400     lprofCurFilename.OwnsFilenamePat = 1;
  430           lprofCurFilename.MergePoolSize = 1;
  432           lprofCurFilename.MergePoolSize = FilenamePat[I] - '0';
  438   lprofCurFilename.NumPids = NumPids;
  439   lprofCurFilename.NumHosts = NumHosts;
  447   const char *OldFilenamePat = lprofCurFilename.FilenamePat;
  448   ProfileNameSpecifier OldPNS = lprofCurFilename.PNS;
  457     lprofCurFilename.PNS = PNS;
  464   lprofCurFilename.PNS = PNS;
  469                 lprofCurFilename.FilenamePat, getPNSStr(PNS));
  473                 OldFilenamePat, getPNSStr(OldPNS), lprofCurFilename.FilenamePat,
  486   if (!lprofCurFilename.FilenamePat || !lprofCurFilename.FilenamePat[0])
  486   if (!lprofCurFilename.FilenamePat || !lprofCurFilename.FilenamePat[0])
  489   if (!(lprofCurFilename.NumPids || lprofCurFilename.NumHosts ||
  489   if (!(lprofCurFilename.NumPids || lprofCurFilename.NumHosts ||
  490         lprofCurFilename.MergePoolSize))
  491     return strlen(lprofCurFilename.FilenamePat);
  493   Len = strlen(lprofCurFilename.FilenamePat) +
  494         lprofCurFilename.NumPids * (strlen(lprofCurFilename.PidChars) - 2) +
  494         lprofCurFilename.NumPids * (strlen(lprofCurFilename.PidChars) - 2) +
  495         lprofCurFilename.NumHosts * (strlen(lprofCurFilename.Hostname) - 2);
  495         lprofCurFilename.NumHosts * (strlen(lprofCurFilename.Hostname) - 2);
  496   if (lprofCurFilename.MergePoolSize)
  508   const char *FilenamePat = lprofCurFilename.FilenamePat;
  510   if (!lprofCurFilename.FilenamePat || !lprofCurFilename.FilenamePat[0])
  510   if (!lprofCurFilename.FilenamePat || !lprofCurFilename.FilenamePat[0])
  513   if (!(lprofCurFilename.NumPids || lprofCurFilename.NumHosts ||
  513   if (!(lprofCurFilename.NumPids || lprofCurFilename.NumHosts ||
  514         lprofCurFilename.MergePoolSize)) {
  516       return lprofCurFilename.FilenamePat;
  518     FilenamePatLength = strlen(lprofCurFilename.FilenamePat);
  519     memcpy(FilenameBuf, lprofCurFilename.FilenamePat, FilenamePatLength);
  524   PidLength = strlen(lprofCurFilename.PidChars);
  525   HostNameLength = strlen(lprofCurFilename.Hostname);
  530         memcpy(FilenameBuf + J, lprofCurFilename.PidChars, PidLength);
  533         memcpy(FilenameBuf + J, lprofCurFilename.Hostname, HostNameLength);
  538         int ProfilePoolId = getpid() % lprofCurFilename.MergePoolSize;
  571   if (lprofCurFilename.ProfilePathPrefix)
  572     return lprofCurFilename.ProfilePathPrefix;
  592   lprofCurFilename.ProfilePathPrefix = Prefix;