[PATCH] GCOV: Print one decimal place in human readable mode.

Martin Liška mliska@suse.cz
Fri Aug 31 11:23:00 GMT 2018


Hi.

There are sometimes situations where a line is executed:

     1G:  307:read_size (unsigned char *p, int size)

in such case a more fine value is appreciated:

     1.4G:  307:read_size (unsigned char *p, int size)

Thus I'm suggesting to add one digit after dot.

Patch survives gcov.exp, will install if not objections.

Martin

gcc/ChangeLog:

2018-08-31  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'.

gcc/testsuite/ChangeLog:

2018-08-31  Martin Liska  <mliska@suse.cz>

	* g++.dg/gcov/loop.C: Update test to support new format.
---
 gcc/doc/gcov.texi                | 2 +-
 gcc/gcov.c                       | 4 ++--
 gcc/testsuite/g++.dg/gcov/loop.C | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-GCOV-Print-one-decimal-place-in-human-readable-mode.patch
Type: text/x-patch
Size: 1567 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180831/e85c134a/attachment.bin>


More information about the Gcc-patches mailing list