Lines Matching +defs:buffer +defs:file +defs:name
127 static void __kmp_print_cond(char *buffer, kmp_cond_align_t *cond) {
128 KMP_SNPRINTF(buffer, 128, "(cond (lock (%ld, %d)), (descr (%p)))",
223 // The optimal situation: the OS returns the size of the buffer it expects.
1388 // cause mapped shared memory file to be left unattended. Thus we postpone
1535 char buffer[128];
1537 __kmp_print_cond(buffer, &th->th.th_suspend_cv);
1539 buffer);
1634 char buffer[128];
1635 __kmp_print_cond(buffer, &th->th.th_suspend_cv);
1637 buffer);
1737 char buffer[128];
1738 __kmp_print_cond(buffer, &th->th.th_suspend_cv);
1740 target_gtid, buffer);
1787 char buffer[128];
1788 __kmp_print_cond(buffer, &__kmp_wait_cv.c_cond);
1790 KMP_GTID_MONITOR, buffer);
1836 struct tms buffer;
1838 /*t =*/times(&buffer);
1840 return (double)(buffer.tms_utime + buffer.tms_cutime) /
1862 // The number of times the file system had to perform input
1864 // The number of times the file system had to perform output
2117 /* On GNUish OSes, read the /proc/<pid>/maps pseudo-file to get all the
2120 char *name = __kmp_str_format("/proc/%d/maps", getpid());
2121 FILE *file = NULL;
2123 file = fopen(name, "r");
2124 KMP_ASSERT(file != NULL);
2132 rc = fscanf(file, "%p-%p %4s %*[^\n]\n", &beginning, &ending, perms);
2151 fclose(file);
2152 KMP_INTERNAL_FREE(name);
2238 int file;
2248 char *name = __kmp_str_format("/proc/%d/map", pid);
2250 file = open(name, O_RDONLY);
2251 if (file == -1) {
2252 KMP_INTERNAL_FREE(name);
2258 while (sz > 0 && (rd = pread(file, buf, sz, 0)) == sz) {
2278 close(file);
2279 KMP_INTERNAL_FREE(name);
2285 int buffer;
2291 (vm_address_t)(&buffer), // Address of buffer to save read bytes in.
2360 uint32_t loadQueryBufSize = 4096u; // Default loadquery buffer size.
2486 // Set first CPU as the name of the first logical CPU for which the info is
2489 strcpy(first_cpu_name.name, FIRST_CPU);
2591 // Proc entry is a directory and name starts with a digit. Assume it is a
2628 // Construct fixed part of stat file path.
2636 // It is a directory and name starts with a digit.
2639 // Construct complete stat file path. Easiest way would be:
2654 // just before reading this file.
2656 /* Content of "stat" file looks like:
2659 It is a single line (if program name does not include funny
2660 symbols). First number is a thread id, then name of executable
2661 file name in paretheses, then state of the thread. We need just
2664 Good news: Length of program name is 15 characters max. Longer
2667 Thus, we need rather short buffer: 15 chars for program name +
2670 Bad news: Program name may contain special symbols like space,
2672 "stat" file not 100 % reliable. In case of fanny program names
2675 Parsing "status" file looks more promissing (due to different
2676 file structure and escaping special symbols) but reading and
2677 parsing of "status" file works slower.
2680 char buffer[65];
2682 len = read(stat_file, buffer, sizeof(buffer) - 1);
2684 buffer[len] = 0;
2686 // sscanf( buffer, "%*d (%*s) %c ", & state );
2689 char *close_parent = strstr(buffer, ") ");
3107 // end of file //