Mainline merge part 14 - profiler improvements

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Wed May 8 06:27:00 GMT 2002


Hello.

> > > > +       /* propagate counters of main thread to global ones.  */
> > > > +       __bb_thread_end_func (GET_ARC_COUNTERS_TSD);
> > > > + 
> > > > +       /* If we are here for the first time (could be more times due
> > > > +          to forking), move results from static counters.  */
> > > > +       LOCK_ARC_COUNTERS;
> > > 
> > > What, exactly, are you locking here?  AFAICT, __bb_thread_end_func
> > > is synchronous with this function.
> > 
> > Maybe, I'm not so sure about it. We probably won't spoil anything by leaving
> > lock here.
> 
> I would not feel confortable to have bits of code no one knows the purpose,
> pelase try to take a look at it.

I know what is the purpose -- I'm not just exactly sure what exactly is
the interaction between threads/thread library/exit code (it is, whether threads
still run and may end in the moment we are here).

Zdenek



More information about the Gcc-patches mailing list