Re: [google 4.7] atomic update of profile counters (issue6965050)

2012-12-21 Thread Jan Hubicka
> On Fri, Dec 21, 2012 at 10:13 AM, Jan Hubicka wrote: > >> On Thu, Dec 20, 2012 at 8:20 AM, Jan Hubicka wrote: > >> >> On Wed, Dec 19, 2012 at 4:29 PM, Andrew Pinski > >> >> wrote: > >> >> > > >> >> > On Wed, Dec 19, 2012 at 12:08 PM, Rong Xu wrote: > >> >> > > Hi, > >> >> > > > >> >> > > Thi

Re: [google 4.7] atomic update of profile counters (issue6965050)

2012-12-21 Thread Richard Biener
On Fri, Dec 21, 2012 at 10:13 AM, Jan Hubicka wrote: >> On Thu, Dec 20, 2012 at 8:20 AM, Jan Hubicka wrote: >> >> On Wed, Dec 19, 2012 at 4:29 PM, Andrew Pinski wrote: >> >> > >> >> > On Wed, Dec 19, 2012 at 12:08 PM, Rong Xu wrote: >> >> > > Hi, >> >> > > >> >> > > This patch adds the supprot

Re: [google 4.7] atomic update of profile counters (issue6965050)

2012-12-21 Thread Jan Hubicka
> On Thu, Dec 20, 2012 at 8:20 AM, Jan Hubicka wrote: > >> On Wed, Dec 19, 2012 at 4:29 PM, Andrew Pinski wrote: > >> > > >> > On Wed, Dec 19, 2012 at 12:08 PM, Rong Xu wrote: > >> > > Hi, > >> > > > >> > > This patch adds the supprot of atomic update the profile counters. > >> > > Tested with g

Re: [google 4.7] atomic update of profile counters (issue6965050)

2012-12-20 Thread Andrew Pinski
On Thu, Dec 20, 2012 at 11:35 AM, Rong Xu wrote: > we have this patch primarily for getting valid profile counts. we > observe that for some high-threaded programs, we are getting poor > counter due to data racing of counter update (like counter value is > only 15% of what it supposed to be for a

Re: [google 4.7] atomic update of profile counters (issue6965050)

2012-12-20 Thread Rong Xu
we have this patch primarily for getting valid profile counts. we observe that for some high-threaded programs, we are getting poor counter due to data racing of counter update (like counter value is only 15% of what it supposed to be for a 10-thread program). In general, enabling atomic updates s

Re: [google 4.7] atomic update of profile counters (issue6965050)

2012-12-20 Thread Andrew Pinski
On Thu, Dec 20, 2012 at 8:20 AM, Jan Hubicka wrote: >> On Wed, Dec 19, 2012 at 4:29 PM, Andrew Pinski wrote: >> > >> > On Wed, Dec 19, 2012 at 12:08 PM, Rong Xu wrote: >> > > Hi, >> > > >> > > This patch adds the supprot of atomic update the profile counters. >> > > Tested with google internal b

Re: [google 4.7] atomic update of profile counters (issue6965050)

2012-12-20 Thread Jan Hubicka
> On Wed, Dec 19, 2012 at 4:29 PM, Andrew Pinski wrote: > > > > On Wed, Dec 19, 2012 at 12:08 PM, Rong Xu wrote: > > > Hi, > > > > > > This patch adds the supprot of atomic update the profile counters. > > > Tested with google internal benchmarks and fdo kernel build. > > > > I think you should u

Re: [google 4.7] atomic update of profile counters (issue6965050)

2012-12-19 Thread Rong Xu
On Wed, Dec 19, 2012 at 4:29 PM, Andrew Pinski wrote: > > On Wed, Dec 19, 2012 at 12:08 PM, Rong Xu wrote: > > Hi, > > > > This patch adds the supprot of atomic update the profile counters. > > Tested with google internal benchmarks and fdo kernel build. > > I think you should use the __atomic_ f

Re: [google 4.7] atomic update of profile counters (issue6965050)

2012-12-19 Thread Andrew Pinski
On Wed, Dec 19, 2012 at 12:08 PM, Rong Xu wrote: > Hi, > > This patch adds the supprot of atomic update the profile counters. > Tested with google internal benchmarks and fdo kernel build. I think you should use the __atomic_ functions instead of __sync_ functions as they allow better performance

Re: [google 4.7] atomic update of profile counters (issue6965050)

2012-12-19 Thread Xinliang David Li
This looks good to me for google branches. Useful for trunk too. David On Wed, Dec 19, 2012 at 12:08 PM, Rong Xu wrote: > Hi, > > This patch adds the supprot of atomic update the profile counters. > Tested with google internal benchmarks and fdo kernel build. > > Thanks, > > -Rong > > 2012-12-19

[google 4.7] atomic update of profile counters (issue6965050)

2012-12-19 Thread Rong Xu
Hi, This patch adds the supprot of atomic update the profile counters. Tested with google internal benchmarks and fdo kernel build. Thanks, -Rong 2012-12-19 Rong Xu * gcc/common.opt: Add -fprofile-gen-atomic option. * gcc/gcov-io.h: Add profile atomic update support.