aboutsummaryrefslogtreecommitdiff
path: root/gcc/timevar.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2020-09-02 14:30:16 +0200
committerMartin Liska <mliska@suse.cz>2020-09-21 10:09:26 +0200
commit79f4e20dd1280e6a44736070b0d5213f9a8f85d4 (patch)
tree4cd45738168a0f369744fc4a704dea910f87e8d7 /gcc/timevar.c
parent432c551b17d655823a4825855b4b966441c8cfb3 (diff)
downloadgcc-79f4e20dd1280e6a44736070b0d5213f9a8f85d4.zip
gcc-79f4e20dd1280e6a44736070b0d5213f9a8f85d4.tar.gz
gcc-79f4e20dd1280e6a44736070b0d5213f9a8f85d4.tar.bz2
Use SIZE_AMOUNT macro for GGC memory allocation numbers.
gcc/ChangeLog: * ggc-common.c (ggc_prune_overhead_list): Use SIZE_AMOUNT. * ggc-page.c (release_pages): Likewise. (ggc_collect): Likewise. (ggc_trim): Likewise. (ggc_grow): Likewise. * timevar.c (timer::print): Likewise. gcc/testsuite/ChangeLog: * g++.dg/ext/timevar1.C: Prune more possible number values. * g++.dg/ext/timevar2.C: Likewise.
Diffstat (limited to 'gcc/timevar.c')
-rw-r--r--gcc/timevar.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/timevar.c b/gcc/timevar.c
index a3a882d..8fbf5fa 100644
--- a/gcc/timevar.c
+++ b/gcc/timevar.c
@@ -661,8 +661,8 @@ timer::print_row (FILE *fp,
#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);
@@ -712,7 +712,7 @@ timer::print (FILE *fp)
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);
@@ -776,7 +776,7 @@ timer::print (FILE *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");