}
}
-/* Print memory used by heap in kb if this info is available. */
+/* Print memory used by heap if this info is available. */
void
report_heap_memory_use ()
#define MALLINFO_FN mallinfo
#endif
if (!quiet_flag)
- fprintf (stderr," {heap %luk}",
- (unsigned long) MALLINFO_FN ().arena / ONE_K);
+ fprintf (stderr, " {heap " PRsa (0) "}",
+ SIZE_AMOUNT (MALLINFO_FN ().arena));
#endif
}
{
fprintf (stderr, " {GC");
if (n1)
- fprintf (stderr, " released %luk", (unsigned long)(n1 / 1024));
+ fprintf (stderr, " released " PRsa (0), SIZE_AMOUNT (n1));
if (n2)
- fprintf (stderr, " madv_dontneed %luk", (unsigned long)(n2 / 1024));
+ fprintf (stderr, " madv_dontneed " PRsa (0), SIZE_AMOUNT (n2));
fprintf (stderr, "}");
}
}
/* Output this later so we do not interfere with release_pages. */
if (!quiet_flag)
- fprintf (stderr, " {GC %luk -> ", (unsigned long) allocated / 1024);
+ fprintf (stderr, " {GC " PRsa (0) " -> ", SIZE_AMOUNT (allocated));
/* Indicate that we've seen collections at this context depth. */
G.context_depth_collections = ((unsigned long)1 << (G.context_depth + 1)) - 1;
timevar_pop (TV_GC);
if (!quiet_flag)
- fprintf (stderr, "%luk}", (unsigned long) G.allocated / 1024);
+ fprintf (stderr, PRsa (0) "}", SIZE_AMOUNT (G.allocated));
if (GGC_DEBUG_LEVEL >= 2)
fprintf (G.debug_file, "END COLLECTING\n");
}
sweep_pages ();
release_pages ();
if (!quiet_flag)
- fprintf (stderr, " {GC trimmed to %luk, %luk mapped}",
- (unsigned long) G.allocated / 1024,
- (unsigned long) G.bytes_mapped / 1024);
+ fprintf (stderr, " {GC trimmed to " PRsa (0) ", " PRsa (0) " mapped}",
+ SIZE_AMOUNT (G.allocated), SIZE_AMOUNT (G.bytes_mapped));
timevar_pop (TV_GC);
}
else
ggc_collect ();
if (!quiet_flag)
- fprintf (stderr, " {GC %luk} ", (unsigned long) G.allocated / 1024);
+ fprintf (stderr, " {GC " PRsa (0) "} ", SIZE_AMOUNT (G.allocated));
}
void
// { dg-options "-ftime-report" }
// { dg-allow-blank-lines-in-output 1 }
// { dg-prune-output "Time variable" }
-// { dg-prune-output " kB" }
+// { dg-prune-output "k" }
+// { dg-prune-output " 0 " }
// { dg-prune-output "checks" }
void
// PR c++/57524
// { dg-options "-ftime-report" }
// { dg-prune-output "Time variable" }
-// { dg-prune-output " kB" }
+// { dg-prune-output "k" }
+// { dg-prune-output " 0 " }
// { dg-prune-output "checks" }
namespace detail {
#endif /* HAVE_WALL_TIME */
/* Print the amount of ggc memory allocated. */
- fprintf (fp, "%8u kB (%3.0f%%)",
- (unsigned) (elapsed.ggc_mem >> 10),
+ fprintf (fp, PRsa (6) " (%3.0f%%)",
+ SIZE_AMOUNT (elapsed.ggc_mem),
(total->ggc_mem == 0
? 0
: (float) elapsed.ggc_mem / total->ggc_mem) * 100);
TIMEVAR. */
m_start_time = now;
- fprintf (fp, "\n%-35s%16s%14s%14s%18s\n", "Time variable", "usr", "sys",
+ fprintf (fp, "\n%-35s%16s%14s%14s%14s\n", "Time variable", "usr", "sys",
"wall", "GGC");
if (m_jit_client_items)
fputs ("GCC items:\n", fp);
#ifdef HAVE_WALL_TIME
fprintf (fp, "%8.2f ", total->wall);
#endif
- fprintf (fp, "%9u kB\n", (unsigned) (total->ggc_mem >> 10));
+ fprintf (fp, PRsa (7) "\n", SIZE_AMOUNT (total->ggc_mem));
if (CHECKING_P || flag_checking)
fprintf (fp, "Extra diagnostic checks enabled; compiler may run slowly.\n");