This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Mainline merge part 14 - profiler improvements
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