Re: [PATCH] Indirect-call topn targets profiler (instrumentation)

2014-10-07 Thread Bernhard Reutner-Fischer
On 6 October 2014 22:31:18 CEST, Jan Hubicka wrote: >> >> Is it ok to commit these two patches now? > >Yes, it is OK, thanks! I do not see documentation of the new parameter added to doc in the ChangeLog? Also, I would not abbreviate "indir" in the param name. Thanks,

Re: [PATCH] Indirect-call topn targets profiler (instrumentation)

2014-10-06 Thread Xinliang David Li
On Mon, Oct 6, 2014 at 1:31 PM, Jan Hubicka wrote: >> >> Yes. That's doable. I'm just not sure if top 2 entries are enough. I >> can see from your example that it will be useful for BBs having >> multiple case stmt. > > I suppose we want real histogram profiler here. I.e. something that is given

Re: [PATCH] Indirect-call topn targets profiler (instrumentation)

2014-10-06 Thread Jan Hubicka
> > Yes. That's doable. I'm just not sure if top 2 entries are enough. I > can see from your example that it will be useful for BBs having > multiple case stmt. I suppose we want real histogram profiler here. I.e. something that is given value ranges and fill in the counts depending on value ran

Re: [PATCH] Indirect-call topn targets profiler (instrumentation)

2014-10-06 Thread Rong Xu
On Mon, Oct 6, 2014 at 12:21 PM, Jan Hubicka wrote: >> On Mon, Oct 6, 2014 at 11:22 AM, Jan Hubicka wrote: >> > Rong, >> > Would be possible to use topn profiler to get resonale histograms for >> > switch >> > expansion, too? In that case it may make sense to have value version of >> > it as w

Re: [PATCH] Indirect-call topn targets profiler (instrumentation)

2014-10-06 Thread Jan Hubicka
> On Mon, Oct 6, 2014 at 11:22 AM, Jan Hubicka wrote: > > Rong, > > Would be possible to use topn profiler to get resonale histograms for switch > > expansion, too? In that case it may make sense to have value version of it > > as well. > > The underlying topn_profiler can be used the same way

Re: [PATCH] Indirect-call topn targets profiler (instrumentation)

2014-10-06 Thread Xinliang David Li
On Mon, Oct 6, 2014 at 11:22 AM, Jan Hubicka wrote: > Rong, > Would be possible to use topn profiler to get resonale histograms for switch > expansion, too? In that case it may make sense to have value version of it > as well. The underlying topn_profiler can be used the same way as the current

Re: [PATCH] Indirect-call topn targets profiler (instrumentation)

2014-10-06 Thread Jan Hubicka
Rong, Would be possible to use topn profiler to get resonale histograms for switch expansion, too? In that case it may make sense to have value version of it as well. Otherwise the patch seems OK. I would implement it myself by introducing separate variables holding the topn profiler declarati

[PATCH] Indirect-call topn targets profiler (instrumentation)

2014-10-06 Thread Rong Xu
Hi, I ported the indirect-call topn target profile from google branch. It implements the algorithm described in "Value profiling and optimization" by Brad Calder and Peter Feller. This patch is about the instrumentation. When --param=indir-call-topn-profile=1 is specified, we will use indirection-