From: William C. <wc...@re...> - 2006-11-20 15:16:44
|
Philippe Elie wrote: > Perhaps I missed a discussion but John applying the xml patch > reverted the last commit by Will. If the revert was intended the > ChangeLog says nothing about this, I'm speaking about: > > --- op_alloc_counter.c 2006/11/17 18:20:38 1.7 > +++ op_alloc_counter.c 2006/11/17 23:47:29 1.8 > @@ -130,7 +130,7 @@ > counter_arc const * arc = list_entry(pos, counter_arc, next); > > if (allocated_mask & (1 << arc->counter)) > - continue; > + return 0; > > counter_map[depth] = arc->counter; > > anyway I'm unsure if Will patch is correct. Will have you a test case > showing a failure which is now working with your patch applied ? > Hi Philippe, There are two cases where this patch is needed. In August Jeramiah Lott encountered a case on mips/34K where op_help could not allocate the registers. This is due to some events being available on a subset of registers other events. INSTRUCTIONS and L2_MISSES available and 0,1,2,and 3, but BRANCH_MISPREDICTS and BRANCH_INSNS_LAUNCHED only available on 0 and 2. With patch get the following: [test@timesys-y91ad5l oprofile]$ utils/ophelp -c mips/34K --check-events INSTRUCTIONS:500:0:1:1 BRANCH_MISPREDICTS:500:0:1:1 BRANCH_INSNS_LAUNCHED:500:0:1:1 L2_MISSES:500:0:1:1 1 0 2 3 The other case is dealing with the changes in the 2.6.19-rc6 kernel where one of the registers is already reserved by the watchdog timer. -Will |