lkml.org 
[lkml]   [2011]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] perf, x86: Fix event scheduler for constraints with overlapping counters
On 18.05.11 17:36:53, Peter Zijlstra wrote:
> On Wed, 2011-05-18 at 23:20 +0200, Ingo Molnar wrote:
> > * Peter Zijlstra <peterz@infradead.org> wrote:
> >
> > > > if (c->weight != w)
> > > > continue;
> > > >
> > > > - for_each_set_bit(j, c->idxmsk, X86_PMC_IDX_MAX) {
> > > > - if (!test_bit(j, used_mask))
> > > > + /* for each bit in idxmsk starting from idx */
> > > > + while (idx < X86_PMC_IDX_MAX) {
> > > > + idx = find_next_bit(c->idxmsk, X86_PMC_IDX_MAX,
> > > > + idx);
> > >
> > > I'd be mighty tempted to ignore that 80 column rule here ;-)
> >
> > Please put the body of the loop into a helper function, the function is large
> > and there are countless col80 uglinesses in it!
>
> I just tried that, its real ugly due to the amount of state you need to
> pass around.

I will try to improve the patch and send a new version.

Thanks for review.

-Robert

--
Advanced Micro Devices, Inc.
Operating System Research Center



\
 
 \ /
  Last update: 2011-05-19 12:51    [W:0.118 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site