Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2019-01-31 Thread Bin.Cheng
On Tue, Jan 15, 2019 at 1:10 AM Andi Kleen wrote: > > On Mon, Jan 14, 2019 at 04:15:20PM +0800, Bin.Cheng wrote: > > On Mon, Jan 14, 2019 at 4:07 PM Andi Kleen wrote: > > > > > > Bin Cheng, > > > > > > I did some testing on this now. The attached patch automatically > > > increases the iteration

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2019-01-14 Thread Andi Kleen
On Mon, Jan 14, 2019 at 04:15:20PM +0800, Bin.Cheng wrote: > On Mon, Jan 14, 2019 at 4:07 PM Andi Kleen wrote: > > > > Bin Cheng, > > > > I did some testing on this now. The attached patch automatically increases > > the iterations > > for autofdo profiles. > Hi Andi, thanks very much for tuning

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2019-01-14 Thread Bin.Cheng
On Mon, Jan 14, 2019 at 4:07 PM Andi Kleen wrote: > > Bin Cheng, > > I did some testing on this now. The attached patch automatically increases > the iterations > for autofdo profiles. Hi Andi, thanks very much for tuning these. > > But even with even more iterations I still have stable failures

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2019-01-14 Thread Andi Kleen
Bin Cheng, I did some testing on this now. The attached patch automatically increases the iterations for autofdo profiles. But even with even more iterations I still have stable failures in FAIL: gcc.dg/tree-prof/cold_partition_label.c scan-assembler foo[._]+cold FAIL: gcc.dg/tree-prof/cold_pa

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-21 Thread Hans-Peter Nilsson
On Tue, 18 Dec 2018, Andi Kleen wrote: > > Yes, take g++.dg/tree-prof/morefunc.C as an example: > > - int i; > > - for (i = 0; i < 1000; i++) > > + int i, j; > > + for (i = 0; i < 100; i++) > > +for (j = 0; j < 50; j++) > > g += tc->foo(); > > if (g<100) g++; > > } > > @@ -2

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-19 Thread Andi Kleen
On Wed, Dec 19, 2018 at 06:28:29PM +0100, Richard Biener wrote: > On Wed, Dec 19, 2018 at 4:41 PM Andi Kleen wrote: > > > > > > We can combine the two together, increasing iteration count and > > > > decreasing perf count at the same time. What count would you suggest > > > > from your experience

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-19 Thread Richard Biener
On Wed, Dec 19, 2018 at 4:41 PM Andi Kleen wrote: > > > > We can combine the two together, increasing iteration count and > > > decreasing perf count at the same time. What count would you suggest > > > from your experience? > > > > Can we instead for the tests where we want to test profile use/m

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-19 Thread Andi Kleen
On Wed, Dec 19, 2018 at 12:08:35PM +0800, Bin.Cheng wrote: > On Wed, Dec 19, 2018 at 12:00 PM Andi Kleen wrote: > > > > On Wed, Dec 19, 2018 at 10:01:15AM +0800, Bin.Cheng wrote: > > > On Tue, Dec 18, 2018 at 7:15 PM Bin.Cheng wrote: > > > > > > > > On Sun, Dec 16, 2018 at 9:11 AM Andi Kleen wro

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-19 Thread Andi Kleen
> > We can combine the two together, increasing iteration count and > > decreasing perf count at the same time. What count would you suggest > > from your experience? > > Can we instead for the tests where we want to test profile use/merge > elide the profiling step and supply the "raw" data in a

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-19 Thread Richard Biener
On Wed, Dec 19, 2018 at 5:08 AM Bin.Cheng wrote: > > On Wed, Dec 19, 2018 at 12:00 PM Andi Kleen wrote: > > > > On Wed, Dec 19, 2018 at 10:01:15AM +0800, Bin.Cheng wrote: > > > On Tue, Dec 18, 2018 at 7:15 PM Bin.Cheng wrote: > > > > > > > > On Sun, Dec 16, 2018 at 9:11 AM Andi Kleen wrote: > >

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-18 Thread Bin.Cheng
On Wed, Dec 19, 2018 at 12:00 PM Andi Kleen wrote: > > On Wed, Dec 19, 2018 at 10:01:15AM +0800, Bin.Cheng wrote: > > On Tue, Dec 18, 2018 at 7:15 PM Bin.Cheng wrote: > > > > > > On Sun, Dec 16, 2018 at 9:11 AM Andi Kleen wrote: > > > > > > > > "bin.cheng" writes: > > > > > > > > > Hi, > > > >

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-18 Thread Andi Kleen
On Wed, Dec 19, 2018 at 10:01:15AM +0800, Bin.Cheng wrote: > On Tue, Dec 18, 2018 at 7:15 PM Bin.Cheng wrote: > > > > On Sun, Dec 16, 2018 at 9:11 AM Andi Kleen wrote: > > > > > > "bin.cheng" writes: > > > > > > > Hi, > > > > > > > > Due to ICE and mal-functional bugs, indirect call value profil

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-18 Thread Andi Kleen
On Wed, Dec 19, 2018 at 09:26:51AM +0800, Bin.Cheng wrote: > On Wed, Dec 19, 2018 at 5:27 AM Andi Kleen wrote: > > > > > Yes, take g++.dg/tree-prof/morefunc.C as an example: > > > - int i; > > > - for (i = 0; i < 1000; i++) > > > + int i, j; > > > + for (i = 0; i < 100; i++) > > > +for

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-18 Thread Bin.Cheng
On Tue, Dec 18, 2018 at 7:15 PM Bin.Cheng wrote: > > On Sun, Dec 16, 2018 at 9:11 AM Andi Kleen wrote: > > > > "bin.cheng" writes: > > > > > Hi, > > > > > > Due to ICE and mal-functional bugs, indirect call value profile > > > transformation > > > is disabled on GCC-7/8/trunk. This patch resto

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-18 Thread Bin.Cheng
On Wed, Dec 19, 2018 at 5:27 AM Andi Kleen wrote: > > > Yes, take g++.dg/tree-prof/morefunc.C as an example: > > - int i; > > - for (i = 0; i < 1000; i++) > > + int i, j; > > + for (i = 0; i < 100; i++) > > +for (j = 0; j < 50; j++) > > g += tc->foo(); > > if (g<100) g++; > >

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-18 Thread Andi Kleen
> Yes, take g++.dg/tree-prof/morefunc.C as an example: > - int i; > - for (i = 0; i < 1000; i++) > + int i, j; > + for (i = 0; i < 100; i++) > +for (j = 0; j < 50; j++) > g += tc->foo(); > if (g<100) g++; > } > @@ -27,8 +28,9 @@ void test1 (A *tc) > static __attribute__((alw

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-18 Thread Bin.Cheng
On Sun, Dec 16, 2018 at 9:11 AM Andi Kleen wrote: > > "bin.cheng" writes: > > > Hi, > > > > Due to ICE and mal-functional bugs, indirect call value profile > > transformation > > is disabled on GCC-7/8/trunk. This patch restores the transformation. The > > main issue is AutoFDO should store cg

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-15 Thread Andi Kleen
"bin.cheng" writes: > Hi, > > Due to ICE and mal-functional bugs, indirect call value profile transformation > is disabled on GCC-7/8/trunk. This patch restores the transformation. The > main issue is AutoFDO should store cgraph_node's profile_id of callee func in > the first histogram value's

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-13 Thread Jeff Law
On 12/12/18 8:50 PM, bin.cheng wrote: > Hi, > > Due to ICE and mal-functional bugs, indirect call value profile transformation > is disabled on GCC-7/8/trunk. This patch restores the transformation. The > main issue is AutoFDO should store cgraph_node's profile_id of callee func in > the first h

[PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-12 Thread bin.cheng
Hi, Due to ICE and mal-functional bugs, indirect call value profile transformation is disabled on GCC-7/8/trunk. This patch restores the transformation. The main issue is AutoFDO should store cgraph_node's profile_id of callee func in the first histogram value's counter, rather than pointer to c