Lines Matching defs:file
20 /* This file is a wrapper bitset implementation for the other bitset
105 /* Print a percentage histogram with message MSG to FILE. */
107 bitset_percent_histogram_print (FILE *file, const char *name, const char *msg,
120 fprintf (file, "%s %s", name, msg);
122 fprintf (file, "%.0f-%.0f%%\t%8u (%5.1f%%)\n",
129 /* Print a log histogram with message MSG to FILE. */
131 bitset_log_histogram_print (FILE *file, const char *name, const char *msg,
153 fprintf (file, "%s %s", name, msg);
155 fprintf (file, "%*d\t%8u (%5.1f%%)\n",
159 fprintf (file, "%*lu-%lu\t%8u (%5.1f%%)\n",
168 /* Print bitset statistics to FILE. */
170 bitset_stats_print_1 (FILE *file, const char *name,
176 fprintf (file, "%s:\n", name);
177 fprintf (file, _("%u bitset_allocs, %u freed (%.2f%%).\n"),
180 fprintf (file, _("%u bitset_sets, %u cached (%.2f%%)\n"),
183 fprintf (file, _("%u bitset_resets, %u cached (%.2f%%)\n"),
186 fprintf (file, _("%u bitset_tests, %u cached (%.2f%%)\n"),
190 fprintf (file, _("%u bitset_lists\n"), stats->lists);
192 bitset_log_histogram_print (file, name, _("count log histogram\n"),
195 bitset_log_histogram_print (file, name, _("size log histogram\n"),
198 bitset_percent_histogram_print (file, name, _("density histogram\n"),
203 /* Print all bitset statistics to FILE. */
205 bitset_stats_print (FILE *file, bool verbose ATTRIBUTE_UNUSED)
212 fprintf (file, _("Bitset statistics:\n\n"));
215 fprintf (file, _("Accumulated runs = %u\n"), bitset_stats_info->runs);
218 bitset_stats_print_1 (file, bitset_type_names[i],
240 /* Read bitset statistics file. */
244 FILE *file;
252 file = fopen (file_name, "r");
253 if (file)
256 1, file) != 1)
258 if (ferror (file))
259 perror (_("cannot read stats file"));
261 fprintf (stderr, _("bad stats file size\n"));
263 if (fclose (file) != 0)
264 perror (_("cannot read stats file"));
270 /* Write bitset statistics file. */
274 FILE *file;
282 file = fopen (file_name, "w");
283 if (file)
286 1, file) != 1)
287 perror (_("cannot write stats file"));
288 if (fclose (file) != 0)
289 perror (_("cannot write stats file"));
292 perror (_("cannot open stats file for writing"));
296 /* Dump bitset statistics to FILE. */
298 bitset_stats_dump (FILE *file)
300 bitset_stats_print (file, false);