diff options
author | Martin Liska <mliska@suse.cz> | 2018-02-28 14:45:59 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-02-28 13:45:59 +0000 |
commit | 4830cfc0a0cffb1c6f3ab9ec08b9b43681e7868c (patch) | |
tree | 8c0ed49dd4f9534da832f51ce8b959071fe4be19 /gcc/timevar.c | |
parent | 095d8d4b238567c9b884714f673b7e1d0dae3f1e (diff) | |
download | gcc-4830cfc0a0cffb1c6f3ab9ec08b9b43681e7868c.zip gcc-4830cfc0a0cffb1c6f3ab9ec08b9b43681e7868c.tar.gz gcc-4830cfc0a0cffb1c6f3ab9ec08b9b43681e7868c.tar.bz2 |
Fix timevar format and fix tests (PR testsuite/84597).
2018-02-28 Martin Liska <mliska@suse.cz>
PR testsuite/84597
* timevar.c (timer::print): Fix format to properly print 100%
values.
2018-02-28 Martin Liska <mliska@suse.cz>
PR testsuite/84597
* g++.dg/ext/timevar1.C: Fix pruned patterns.
* g++.dg/ext/timevar2.C: Likewise.
From-SVN: r258063
Diffstat (limited to 'gcc/timevar.c')
-rw-r--r-- | gcc/timevar.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/timevar.c b/gcc/timevar.c index d209f5b..2a7defb 100644 --- a/gcc/timevar.c +++ b/gcc/timevar.c @@ -641,27 +641,27 @@ timer::print_row (FILE *fp, #ifdef HAVE_USER_TIME /* Print user-mode time for this process. */ - fprintf (fp, "%7.2f (%2.0f%%)", + fprintf (fp, "%7.2f (%3.0f%%)", elapsed.user, (total->user == 0 ? 0 : elapsed.user / total->user) * 100); #endif /* HAVE_USER_TIME */ #ifdef HAVE_SYS_TIME /* Print system-mode time for this process. */ - fprintf (fp, "%7.2f (%2.0f%%)", + fprintf (fp, "%7.2f (%3.0f%%)", elapsed.sys, (total->sys == 0 ? 0 : elapsed.sys / total->sys) * 100); #endif /* HAVE_SYS_TIME */ #ifdef HAVE_WALL_TIME /* Print wall clock time elapsed. */ - fprintf (fp, "%7.2f (%2.0f%%)", + fprintf (fp, "%7.2f (%3.0f%%)", elapsed.wall, (total->wall == 0 ? 0 : elapsed.wall / total->wall) * 100); #endif /* HAVE_WALL_TIME */ /* Print the amount of ggc memory allocated. */ - fprintf (fp, "%8u kB (%2.0f%%)", + fprintf (fp, "%8u kB (%3.0f%%)", (unsigned) (elapsed.ggc_mem >> 10), (total->ggc_mem == 0 ? 0 @@ -712,7 +712,7 @@ timer::print (FILE *fp) TIMEVAR. */ m_start_time = now; - fprintf (fp, "\n%-35s%15s%13s%13s%17s\n", "Time variable", "usr", "sys", + fprintf (fp, "\n%-35s%16s%14s%14s%18s\n", "Time variable", "usr", "sys", "wall", "GGC"); if (m_jit_client_items) fputs ("GCC items:\n", fp); @@ -771,12 +771,12 @@ timer::print (FILE *fp) fprintf (fp, "%7.2f ", total->user); #endif #ifdef HAVE_SYS_TIME - fprintf (fp, "%7.2f ", total->sys); + fprintf (fp, "%8.2f ", total->sys); #endif #ifdef HAVE_WALL_TIME - fprintf (fp, "%7.2f ", total->wall); + fprintf (fp, "%8.2f ", total->wall); #endif - fprintf (fp, "%8u kB\n", (unsigned) (total->ggc_mem >> 10)); + fprintf (fp, "%9u kB\n", (unsigned) (total->ggc_mem >> 10)); if (CHECKING_P || flag_checking) fprintf (fp, "Extra diagnostic checks enabled; compiler may run slowly.\n"); |