This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Reorgnanization of profile count maintenance code, part 1


> 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!

Honza
> 
> Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]