+2018-09-05 Martin Liska <mliska@suse.cz>
+
+ * doc/gcov.texi: Update documentation of humar
+ readable mode.
+ * gcov.c (format_count): Print one decimal place, it provides
+ more fine number of situations like '1G' vs. '1.4G'.
+
2018-09-05 Martin Liska <mliska@suse.cz>
PR target/87164
@item -j
@itemx --human-readable
-Write counts in human readable format (like 24k).
+Write counts in human readable format (like 24.6k).
@item -k
@itemx --use-colors
if (count + divisor / 2 < 1000 * divisor)
break;
}
- gcov_type r = (count + divisor / 2) / divisor;
- sprintf (buffer, "%" PRId64 "%c", r, units[i]);
+ float r = 1.0f * count / divisor;
+ sprintf (buffer, "%.1f%c", r, units[i]);
return buffer;
}
+2018-09-05 Martin Liska <mliska@suse.cz>
+
+ * g++.dg/gcov/loop.C: Update test to support new format.
+
2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
PR debug/86593
/* { dg-do run { target native } } */
unsigned
-loop (unsigned n, int value) /* count(14k) */
+loop (unsigned n, int value) /* count(14.0k) */
{
for (unsigned i = 0; i < n - 1; i++)
{
- value += i; /* count(21M) */
+ value += i; /* count(21.0M) */
}
return value;
for (unsigned i = 0; i < 7 * 1000; i++)
{
sum += loop (1000, sum);
- sum += loop (2000, sum); /* count(7k) */
+ sum += loop (2000, sum); /* count(7.0k) */
}
return 0; /* count(1) */