Thread-safe profiling

Jan Hubicka
Thu Mar 15 14:22:00 GMT 2007

> Hi,
> On Thu, 15 Mar 2007, Jan Hubicka wrote:
> > Well, on the other hand number of threaded applications is definitly on 
> > a rise and the profile mismatches are evil.
> > 
> > Perhaps we should bite the bullet and make thread safe profiling a 
> > default on targets that support it. At least that is what other 
> > compilers does.
> Not anymore.  The newest ICC doesn't do thread-safe profiling anymore.  
> But that shouldn't hinder us.

Well, thinking about it - making thread-safe profiling a default for
targets defining appropriate builtins seems best choice for me.  We will
get the new infrastructure tested and if we get enough negative
feedback, we can always change the default safely later in release

Trying to imagine what random user would find more discourgrating - ie
longer train runs (still probably quite shorter than in ICC) or weird
looking mismatches and/or wrong resulting profile, I guess the former is
lesser evil and easier to analyze.

The patch would be fine even without the change (I can make it
incrementally), but if you get into it, please also disable the thread
safe profiling for profiledbootstrap - it is slow enough already ;)

> Ciao,
> Michael.

More information about the Gcc-patches mailing list