Reorgnanization of profile count maintenance code, part 1

Jan Hubicka hubicka@ucw.cz
Fri Jun 9 07:52:00 GMT 2017


> 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?
Sorry for the delay. I will regtest the patch now.

Honza
> 
> Jason



More information about the Gcc-patches mailing list