diff options
author | Martin Liska <mliska@suse.cz> | 2020-09-02 14:30:16 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2020-09-21 10:09:26 +0200 |
commit | 79f4e20dd1280e6a44736070b0d5213f9a8f85d4 (patch) | |
tree | 4cd45738168a0f369744fc4a704dea910f87e8d7 /gcc/ggc-page.c | |
parent | 432c551b17d655823a4825855b4b966441c8cfb3 (diff) | |
download | gcc-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/ggc-page.c')
-rw-r--r-- | gcc/ggc-page.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c index 53b311c..9405f03 100644 --- a/gcc/ggc-page.c +++ b/gcc/ggc-page.c @@ -1164,9 +1164,9 @@ release_pages (void) { 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, "}"); } } @@ -2208,7 +2208,7 @@ ggc_collect (void) /* 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; @@ -2235,7 +2235,7 @@ ggc_collect (void) 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"); } @@ -2250,9 +2250,8 @@ ggc_trim () 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); } @@ -2269,7 +2268,7 @@ ggc_grow (void) 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 |