This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] libgcov.c re-factoring and offline profile-tool
- From: Rong Xu <xur at google dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Xinliang David Li <davidxl at google dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 8 Jan 2014 14:33:08 -0800
- Subject: Re: [RFC] libgcov.c re-factoring and offline profile-tool
- Authentication-results: sourceware.org; auth=none
- References: <CAF1bQ=Qy6--WX-bLYZ8aWXjVVu4pW-H3U+PkATgXwg5c7MZsBg at mail dot gmail dot com> <CAAkRFZ+-tLZqUNQRtu7jN3d3BYG8oi-+q0J6pkduHp5GS3oTkQ at mail dot gmail dot com> <20131104095529 dot GB28992 at kam dot mff dot cuni dot cz> <CAF1bQ=THYY8NqoJ0XDYxnFS9=j9P6-5nLwA6nX1bA+0v1zmUoQ at mail dot gmail dot com> <20131111150245 dot GB6009 at atrey dot karlin dot mff dot cuni dot cz> <CAF1bQ=RSUQdE0tkeqeHnbiNkC=PFPDU6O+zLFNA6jUxqV_aAbg at mail dot gmail dot com> <CAF1bQ=SCtewMrgjcYg4v21jA8uWy_9U=9sB9ULznS=9tdJD8mQ at mail dot gmail dot com> <CAF1bQ=TyNC_rAo1V8Zk9ovOvYAtpqVtep_h7WNLk6v6ZerdcaQ at mail dot gmail dot com> <20131206142319 dot GC32664 at kam dot mff dot cuni dot cz>
On Fri, Dec 6, 2013 at 6:23 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> @@ -325,6 +311,9 @@ static struct gcov_summary all_prg;
>> #endif
>> /* crc32 for this program. */
>> static gcov_unsigned_t crc32;
>> +/* Use this summary checksum rather the computed one if the value is
>> + * non-zero. */
>> +static gcov_unsigned_t saved_summary_checksum;
>
> Why do you need to save the checksum? Won't it reset summary back with multiple streaming?
This was for the gcov_tool. checksum will be recomputed in gcov_exit
and the value will depend on
the order of gcov_info list. (the order will be different after
reading from gcda files to memory). The purpose was
to have the same summary_checksum so that I can get identical gcov-dump output.
>
> I would really like to avoid introducing those static vars that are used exclusively
> by gcov_exit. What about putting them into an gcov_context structure that
> is passed around the functions that was broken out?
With my recently patch the localizes this_prg, we only use 64 more
bytes in bss. Do you still we have to remove
all these statics?
>