This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Reorgnanization of profile count maintenance code, part 1
- From: Jason Merrill <jason at redhat dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 8 Jun 2017 09:56:46 -0700
- Subject: Re: Reorgnanization of profile count maintenance code, part 1
- Authentication-results: sourceware.org; auth=none
- References: <20170601113556.GH22051@kam.mff.cuni.cz> <CADzB+2=VFGp_HP7YwnERRTecFKr+rdNBSwyqV7L52sLA8iQd1g@mail.gmail.com> <20170606080047.GB95556@kam.mff.cuni.cz>
On Tue, Jun 6, 2017 at 1:00 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> On Thu, Jun 1, 2017 at 4:35 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> > Index: profile.c
>> > ===================================================================
>> > --- profile.c (revision 248684)
>> > +++ profile.c (working copy)
>> > @@ -67,6 +67,10 @@ along with GCC; see the file COPYING3.
>> >
>> > #include "profile.h"
>> >
>> > +/* Map from BBs/edges to gcov counters. */
>> > +vec<gcov_type> bb_gcov_counts;
>> > +hash_map<edge,gcov_type> edge_gcov_counts;
>>
>> This completely breaks the compiler with
>> --enable-gather-detailed-mem-stats; edge_gcov_counts gets initialized
>> before hash_table_usage in hash-table.c, and so when the constructor
>> for edge_gcov_counts calls hash_table_usage.register_descriptor, m_map
>> is null and we get a SEGV.
>
> I will change this to pointer to avoid static cdtor. Thanks!
Ping?
Jason