Commit 4830cfc0 by Martin Liska Committed by Martin Liska

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
parent 095d8d4b
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 Richard Biener <rguenther@suse.de>
PR middle-end/84607
......
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.
2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
* c-c++-common/dump-ada-spec-8.c: New test.
......
// PR c++/52248
// { dg-options "-ftime-report" }
// { dg-allow-blank-lines-in-output 1 }
// { dg-prune-output "wall" }
// { dg-prune-output "times" }
// { dg-prune-output "TOTAL" }
// { dg-prune-output "Time variable" }
// { dg-prune-output " kB" }
// { dg-prune-output "checks" }
void
......
// PR c++/57524
// { dg-options "-ftime-report" }
// { dg-prune-output "wall" }
// { dg-prune-output "times" }
// { dg-prune-output "TOTAL" }
// { dg-prune-output "Time variable" }
// { dg-prune-output " kB" }
// { dg-prune-output "checks" }
namespace detail {
......
......@@ -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");
......
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