[RFC] libgcov.c re-factoring and offline profile-tool

Jan Hubicka hubicka@ucw.cz
Mon Nov 11 16:22:00 GMT 2013


> Here is the patch that includes profile-tool.
> Profile-tool now has two functions: merge and rewrite. I'll add diff later.
> 
> Compiler is tested with spec2006 and profiledbootstrap.
> profile-tool is tested with spec2006 profiles.

Hi,
it would be nice if you could elaborate bit more on the tool and what it does.
I plan to implement relink only instrumentatino for LTO and for that I will need
profile reading/handling that is independent on functio nbodies, so perhaps
we can unify the infrastructure.  My plans always was to merge the gcov and
profile.c profile handling logic and make it bit more generic.

Also I think profile-tool is a bit generic name. I.e. it does not realy say it
is related to GCC's coverage profiling.  Maybe gcc-profile-tool or
gcov-profile-tool may be better?
Perhaps an resonable option would also be to bundle it into gcov binary...
> Index: libgcc/libgcov-tool.c
> ===================================================================
> --- libgcc/libgcov-tool.c	(revision 0)
> +++ libgcc/libgcov-tool.c	(revision 0)
> @@ -0,0 +1,800 @@
> +/* GCC instrumentation plugin for ThreadSanitizer.
> +   Copyright (C) 2011-2013 Free Software Foundation, Inc.
> +   Contributed by Dmitry Vyukov <dvyukov@google.com>

You need to update this...
Why there needs to be libgcov changes?

Honza



More information about the Gcc-patches mailing list