From: Martin Liska Date: Tue, 27 Feb 2018 08:27:12 +0000 (+0100) Subject: Fix formatting of -ftime-report. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ea2cd1c27657567dc6b5bde5d80a7e4ae12d826c;p=gcc.git Fix formatting of -ftime-report. 2018-02-27 Martin Liska * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 994340a8b6f..1a8edf3c344 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-02-27 Martin Liska + + * 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 * tree-ssa-live.c (remove_unused_scope_block_p): Do not diff --git a/gcc/timevar.c b/gcc/timevar.c index 2816538e2c5..d209f5be0f5 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));