diff options
author | Martin Liska <mliska@suse.cz> | 2018-09-05 10:08:45 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-09-05 08:08:45 +0000 |
commit | d1c772b9bb4053ff15ddbf2fadf8f6ad8210dc4e (patch) | |
tree | 2516ad639cdfd103fce5f92e81e2786e7614be94 /gcc/gcov.c | |
parent | 3d043c51f5356d614ce8cc6678dff874a9c1f4f2 (diff) | |
download | gcc-d1c772b9bb4053ff15ddbf2fadf8f6ad8210dc4e.zip gcc-d1c772b9bb4053ff15ddbf2fadf8f6ad8210dc4e.tar.gz gcc-d1c772b9bb4053ff15ddbf2fadf8f6ad8210dc4e.tar.bz2 |
GCOV: Print one decimal place in human readable mode.
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>
* g++.dg/gcov/loop.C: Update test to support new format.
From-SVN: r264112
Diffstat (limited to 'gcc/gcov.c')
-rw-r--r-- | gcc/gcov.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2216,8 +2216,8 @@ format_count (gcov_type count) 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; } |