diff options
author | Michael Matz <matz@gcc.gnu.org> | 2018-11-16 13:39:18 +0000 |
---|---|---|
committer | Michael Matz <matz@gcc.gnu.org> | 2018-11-16 13:39:18 +0000 |
commit | a0b48080020f344b3d594f31546c714564a061c7 (patch) | |
tree | 8162f07dcc25096c1086e79bcd23464be41cb879 /gcc/ggc-page.c | |
parent | 12eac2321bb613a447197e7a1308d4ce4a266dd5 (diff) |
Don't use %z printf length specifier
* system.h (PRsa): New macro.
(SIZE_AMOUNT): Cast number to uint64_t.
* alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
(pool_usage::dump_footer): Likewise and also use PRIu64.
* bitmap.h (bitmap_usage::dump): Likewise.
* ggc-common.c (ggc_usage::dump): Likewise.
* ggc-page.c (ggc_print_statistics): Likewise.
* input.c (dump_line_table_statistics): Likewise.
* mem-stats.h (mem_usage::dump): Likewise.
(mem_usage::dump_footer): Likewise.
* rtl.c (dump_rtx_statistics): Likewise.
* tree-cfg.c (dump_cfg_stats): Likewise.
* tree-dfa.c (dump_dfa_stats): Likewise.
* tree-phinodes.c (phinodes_print_statistics): Likewise.
* tree-ssanames (ssanames_print_statistics): Likewise.
* vec.c (vec_usage::dump): Likewise.
(vec_usage::dump_footer): Likewise.
From-SVN: r266208
Diffstat (limited to 'gcc/ggc-page.c')
-rw-r--r-- | gcc/ggc-page.c | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c index 00c2864711f..f04b22ca8cc 100644 --- a/gcc/ggc-page.c +++ b/gcc/ggc-page.c @@ -2288,14 +2288,15 @@ ggc_print_statistics (void) overhead += (sizeof (page_entry) - sizeof (long) + BITMAP_SIZE (OBJECTS_IN_PAGE (p) + 1)); } - fprintf (stderr, "%-8zu %10zu%c %10zu%c %10zu%c\n", - OBJECT_SIZE (i), + fprintf (stderr, "%-8" PRIu64 " " PRsa (10) " " PRsa (10) " " + PRsa (10) "\n", + (uint64_t)OBJECT_SIZE (i), SIZE_AMOUNT (allocated), SIZE_AMOUNT (in_use), SIZE_AMOUNT (overhead)); total_overhead += overhead; } - fprintf (stderr, "%-8s %10zu%c %10zu%c %10zu%c\n", + fprintf (stderr, "%-8s " PRsa (10) " " PRsa (10) " " PRsa (10) "\n", "Total", SIZE_AMOUNT (G.bytes_mapped), SIZE_AMOUNT (G.allocated), @@ -2306,42 +2307,42 @@ ggc_print_statistics (void) fprintf (stderr, "\nTotal allocations and overheads during " "the compilation process\n"); - fprintf (stderr, "Total Overhead: %9" - HOST_LONG_LONG_FORMAT "d%c\n", + fprintf (stderr, "Total Overhead: " + PRsa (9) "\n", SIZE_AMOUNT (G.stats.total_overhead)); - fprintf (stderr, "Total Allocated: %9" - HOST_LONG_LONG_FORMAT "d%c\n", + fprintf (stderr, "Total Allocated: " + PRsa (9) "\n", SIZE_AMOUNT (G.stats.total_allocated)); - fprintf (stderr, "Total Overhead under 32B: %9" - HOST_LONG_LONG_FORMAT "d%c\n", + fprintf (stderr, "Total Overhead under 32B: " + PRsa (9) "\n", SIZE_AMOUNT (G.stats.total_overhead_under32)); - fprintf (stderr, "Total Allocated under 32B: %9" - HOST_LONG_LONG_FORMAT "d%c\n", + fprintf (stderr, "Total Allocated under 32B: " + PRsa (9) "\n", SIZE_AMOUNT (G.stats.total_allocated_under32)); - fprintf (stderr, "Total Overhead under 64B: %9" - HOST_LONG_LONG_FORMAT "d%c\n", + fprintf (stderr, "Total Overhead under 64B: " + PRsa (9) "\n", SIZE_AMOUNT (G.stats.total_overhead_under64)); - fprintf (stderr, "Total Allocated under 64B: %9" - HOST_LONG_LONG_FORMAT "d%c\n", + fprintf (stderr, "Total Allocated under 64B: " + PRsa (9) "\n", SIZE_AMOUNT (G.stats.total_allocated_under64)); - fprintf (stderr, "Total Overhead under 128B: %9" - HOST_LONG_LONG_FORMAT "d%c\n", + fprintf (stderr, "Total Overhead under 128B: " + PRsa (9) "\n", SIZE_AMOUNT (G.stats.total_overhead_under128)); - fprintf (stderr, "Total Allocated under 128B: %9" - HOST_LONG_LONG_FORMAT "d%c\n", + fprintf (stderr, "Total Allocated under 128B: " + PRsa (9) "\n", SIZE_AMOUNT (G.stats.total_allocated_under128)); for (i = 0; i < NUM_ORDERS; i++) if (G.stats.total_allocated_per_order[i]) { - fprintf (stderr, "Total Overhead page size %9zu: %9" - HOST_LONG_LONG_FORMAT "d%c\n", - OBJECT_SIZE (i), + fprintf (stderr, "Total Overhead page size %9" PRIu64 ": " + PRsa (9) "\n", + (uint64_t)OBJECT_SIZE (i), SIZE_AMOUNT (G.stats.total_overhead_per_order[i])); - fprintf (stderr, "Total Allocated page size %9zu: %9" - HOST_LONG_LONG_FORMAT "d%c\n", - OBJECT_SIZE (i), + fprintf (stderr, "Total Allocated page size %9" PRIu64 ": " + PRsa (9) "\n", + (uint64_t)OBJECT_SIZE (i), SIZE_AMOUNT (G.stats.total_allocated_per_order[i])); } } |