[PATCH] GCOV: create one intermediate file per a gcno file (PR gcov-profile/82702).

Martin Liška mliska@suse.cz
Tue Oct 31 15:59:00 GMT 2017


Hi.

This is partial revert of r246804 where I accidentally changed behavior so that each
intermediate file is written to a source file. That's not intended for example for header files.
As mentioned in documentation: "The output is a single ‘.gcov’ file per ‘.gcda’ file".
Outer loop in main function must be changed and intermediate files should be processed one by one
(process_file + generate_results). On the contrary, for normal mode, we first process all files
and then print gcov file for all seen source files.

Patch survives gcov.exp test suite.

Ready for trunk?
Thanks,
Martin

gcc/ChangeLog:

2017-10-31  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/82702
	* gcov.c (main): Handle intermediate files in a different
	way.
	(get_gcov_intermediate_filename): New function.
	(output_gcov_file): Remove support of intermediate files.
	(generate_results): Allocate intermediate file.
	(release_structures): Clean-up properly fn_end.
---
  gcc/gcov.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++++-------------
  1 file changed, 91 insertions(+), 23 deletions(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-GCOV-create-one-intermediate-file-per-a-gcno-file-PR.patch
Type: text/x-patch
Size: 4905 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20171031/b6db976f/attachment.bin>


More information about the Gcc-patches mailing list