> On Fri, Apr 15, 2011 at 15:20, Xinliang David Li <davi...@google.com> wrote:
> > This is a trivial patch to deal with bad profile data (from
> > multi-threaded programs) that leads to divide by zero error.
> >
> > Ok for trunk?
> >
> > Thanks,
> >
> > David
> >
> >
> >
> > 2011-04-15  Xinliang David Li  <davi...@google.com>
> >
> >        * ipa-inline.c (cgraph_decide_recursive_inlining): Fix
> >        div by zero error with insane profile.
> 
> Looks fine to me, but you really want Honza to review this.  Any
> chance we can get a test case for this?

Yes, this is OK for release branches.
On mainline I already fixed it with the current inliner reorg.  The weird think
is that the problem reproduce with sqlite build when profile is not present and
thus all counters should be zero.  Since the division is already guarded by
max_count being 0, someone must set non-zero count of some cgrpah edge that is
wrong.  I will need to investigate this...

Thanks,
Honza
> 
> 
> Diego.

Reply via email to