Home | History | Annotate | Download | only in profile

Lines Matching defs:File

1 /*===- InstrProfilingFile.c - Write instrumentation to a file -------------===*\
5 |* This file is distributed under the University of Illinois Open Source
26 #include <sys/file.h>
64 /* File name string possibly with %p or %h specifiers. */
92 FILE *File = (FILE *)*WriterCtx;
94 if (fwrite(IOVecs[I].Data, IOVecs[I].ElmSize, IOVecs[I].NumElm, File) !=
102 lprofCreateBufferIOInternal(void *File, uint32_t BufferSz) {
106 return lprofCreateBufferIO(fileWriter, File);
122 static int doProfileMerging(FILE *ProfileFile) {
133 /* Restore file offset. */
144 "source profile file is too small.");
159 "source profile file is not compatible.");
170 /* Open the profile data for merging. It opens the file in r+b mode with
171 * file locking. If the file has content which is compatible with the
172 * current process, it also reads in the profile data in the file and merge
176 * its instrumented shared libraries dump profile data into their own data file.
178 static FILE *openFileForMerging(const char *ProfileFileName) {
179 FILE *ProfileFile;
189 PROF_ERR("Profile Merging of file %s failed: %s\n", ProfileFileName,
198 /* Write profile data to file \c OutputName. */
201 FILE *OutputFile;
222 FILE *File;
231 /* Create the directory holding the file, if needed. */
238 /* Truncate the file. Later we'll reopen and append. */
239 File = fopen(Filename, "w");
240 if (!File)
242 fclose(File);
339 PROF_NOTE("Set profile file path to \"%s\" via %s.\n",
372 /* Return the pointer to the current profile file name (after substituting
460 /* The public API for writing profile data into the file with name
476 PROF_ERR("Failed to write file : %s\n", "Filename not set");
489 /* Write profile data to the file. */
492 PROF_ERR("Failed to write file \"%s\": %s\n", Filename, strerror(errno));