Commit ea2cd1c2 by Martin Liska Committed by Martin Liska

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
parent 9893273d
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> 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
* tree-ssa-live.c (remove_unused_scope_block_p): Do not * tree-ssa-live.c (remove_unused_scope_block_p): Do not
......
...@@ -637,31 +637,31 @@ timer::print_row (FILE *fp, ...@@ -637,31 +637,31 @@ timer::print_row (FILE *fp,
const char *name, const timevar_time_def &elapsed) const char *name, const timevar_time_def &elapsed)
{ {
/* The timing variable name. */ /* The timing variable name. */
fprintf (fp, " %-24s:", name); fprintf (fp, " %-35s:", name);
#ifdef HAVE_USER_TIME #ifdef HAVE_USER_TIME
/* Print user-mode time for this process. */ /* Print user-mode time for this process. */
fprintf (fp, "%7.2f (%2.0f%%) usr", fprintf (fp, "%7.2f (%2.0f%%)",
elapsed.user, elapsed.user,
(total->user == 0 ? 0 : elapsed.user / total->user) * 100); (total->user == 0 ? 0 : elapsed.user / total->user) * 100);
#endif /* HAVE_USER_TIME */ #endif /* HAVE_USER_TIME */
#ifdef HAVE_SYS_TIME #ifdef HAVE_SYS_TIME
/* Print system-mode time for this process. */ /* Print system-mode time for this process. */
fprintf (fp, "%7.2f (%2.0f%%) sys", fprintf (fp, "%7.2f (%2.0f%%)",
elapsed.sys, elapsed.sys,
(total->sys == 0 ? 0 : elapsed.sys / total->sys) * 100); (total->sys == 0 ? 0 : elapsed.sys / total->sys) * 100);
#endif /* HAVE_SYS_TIME */ #endif /* HAVE_SYS_TIME */
#ifdef HAVE_WALL_TIME #ifdef HAVE_WALL_TIME
/* Print wall clock time elapsed. */ /* Print wall clock time elapsed. */
fprintf (fp, "%7.2f (%2.0f%%) wall", fprintf (fp, "%7.2f (%2.0f%%)",
elapsed.wall, elapsed.wall,
(total->wall == 0 ? 0 : elapsed.wall / total->wall) * 100); (total->wall == 0 ? 0 : elapsed.wall / total->wall) * 100);
#endif /* HAVE_WALL_TIME */ #endif /* HAVE_WALL_TIME */
/* Print the amount of ggc memory allocated. */ /* 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), (unsigned) (elapsed.ggc_mem >> 10),
(total->ggc_mem == 0 (total->ggc_mem == 0
? 0 ? 0
...@@ -712,7 +712,8 @@ timer::print (FILE *fp) ...@@ -712,7 +712,8 @@ timer::print (FILE *fp)
TIMEVAR. */ TIMEVAR. */
m_start_time = now; 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) if (m_jit_client_items)
fputs ("GCC items:\n", fp); fputs ("GCC items:\n", fp);
for (id = 0; id < (unsigned int) TIMEVAR_LAST; ++id) for (id = 0; id < (unsigned int) TIMEVAR_LAST; ++id)
...@@ -765,15 +766,15 @@ timer::print (FILE *fp) ...@@ -765,15 +766,15 @@ timer::print (FILE *fp)
m_jit_client_items->print (fp, total); m_jit_client_items->print (fp, total);
/* Print total time. */ /* Print total time. */
fputs (" TOTAL :", fp); fprintf (fp, " %-35s:", "TOTAL");
#ifdef HAVE_USER_TIME #ifdef HAVE_USER_TIME
fprintf (fp, "%7.2f ", total->user); fprintf (fp, "%7.2f ", total->user);
#endif #endif
#ifdef HAVE_SYS_TIME #ifdef HAVE_SYS_TIME
fprintf (fp, "%7.2f ", total->sys); fprintf (fp, "%7.2f ", total->sys);
#endif #endif
#ifdef HAVE_WALL_TIME #ifdef HAVE_WALL_TIME
fprintf (fp, "%7.2f ", total->wall); fprintf (fp, "%7.2f ", total->wall);
#endif #endif
fprintf (fp, "%8u kB\n", (unsigned) (total->ggc_mem >> 10)); fprintf (fp, "%8u kB\n", (unsigned) (total->ggc_mem >> 10));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment