diff options
author | Martin Liska <mliska@suse.cz> | 2018-02-27 09:27:12 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-02-27 08:27:12 +0000 |
commit | ea2cd1c27657567dc6b5bde5d80a7e4ae12d826c (patch) | |
tree | dd6c904a867fa91baa6d55b357fde4b7d6f32d9e /gcc | |
parent | 9893273d9826229c41075f568f343bfc7c32d9dd (diff) | |
download | gcc-ea2cd1c27657567dc6b5bde5d80a7e4ae12d826c.zip gcc-ea2cd1c27657567dc6b5bde5d80a7e4ae12d826c.tar.gz gcc-ea2cd1c27657567dc6b5bde5d80a7e4ae12d826c.tar.bz2 |
Fix formatting of -ftime-report.
2018-02-27 Martin Liska <mliska@suse.cz>
* timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
'ggc' suffixes. Change first column width.
(timer::print): Fix formatting of the column.
From-SVN: r258029
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/timevar.c | 21 |
2 files changed, 17 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 994340a..1a8edf3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-02-27 Martin Liska <mliska@suse.cz> + + * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and + 'ggc' suffixes. Change first column width. + (timer::print): Fix formatting of the column. + 2018-02-27 Alexandre Oliva <aoliva@redhat.com> * tree-ssa-live.c (remove_unused_scope_block_p): Do not diff --git a/gcc/timevar.c b/gcc/timevar.c index 2816538..d209f5b 100644 --- a/gcc/timevar.c +++ b/gcc/timevar.c @@ -637,31 +637,31 @@ timer::print_row (FILE *fp, const char *name, const timevar_time_def &elapsed) { /* The timing variable name. */ - fprintf (fp, " %-24s:", name); + fprintf (fp, " %-35s:", name); #ifdef HAVE_USER_TIME /* Print user-mode time for this process. */ - fprintf (fp, "%7.2f (%2.0f%%) usr", + fprintf (fp, "%7.2f (%2.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%%) sys", + fprintf (fp, "%7.2f (%2.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%%) wall", + fprintf (fp, "%7.2f (%2.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%%) ggc", + fprintf (fp, "%8u kB (%2.0f%%)", (unsigned) (elapsed.ggc_mem >> 10), (total->ggc_mem == 0 ? 0 @@ -712,7 +712,8 @@ timer::print (FILE *fp) TIMEVAR. */ m_start_time = now; - fputs ("\nExecution times (seconds)\n", fp); + fprintf (fp, "\n%-35s%15s%13s%13s%17s\n", "Time variable", "usr", "sys", + "wall", "GGC"); if (m_jit_client_items) fputs ("GCC items:\n", fp); for (id = 0; id < (unsigned int) TIMEVAR_LAST; ++id) @@ -765,15 +766,15 @@ timer::print (FILE *fp) m_jit_client_items->print (fp, total); /* Print total time. */ - fputs (" TOTAL :", fp); + fprintf (fp, " %-35s:", "TOTAL"); #ifdef HAVE_USER_TIME - fprintf (fp, "%7.2f ", total->user); + fprintf (fp, "%7.2f ", total->user); #endif #ifdef HAVE_SYS_TIME - fprintf (fp, "%7.2f ", total->sys); + fprintf (fp, "%7.2f ", total->sys); #endif #ifdef HAVE_WALL_TIME - fprintf (fp, "%7.2f ", total->wall); + fprintf (fp, "%7.2f ", total->wall); #endif fprintf (fp, "%8u kB\n", (unsigned) (total->ggc_mem >> 10)); |