[Cbe-oss-dev] [RFC, PATCH] CELL Oprofile SPU profiling updated patch

Milton Miller miltonm at bga.com
Sat Feb 10 16:15:27 EST 2007


On Feb 9, 2007, at 3:52 PM, Carl Love wrote:

> On Fri, 2007-02-09 at 13:36 -0600, Milton Miller wrote:
>> On Feb 9, 2007, at 11:42 AM, Carl Love wrote:
>>
>>> On Thu, 2007-02-08 at 09:48 -0600, Milton Miller wrote:
>>>> This is part 2, with specific comments to the existing patch.
>>>> I'm not subscribed to the list, so please cc.
>>>> miltonm at bga.com  Milton Miller
>>
>>>>
>>>> so samples[spu][entry] = spu_pc_lower;
>>>>     samples[spu + SPUS_PER_ENTRY][entry] = spu_pc_upper
>>>>
>>>> hmm... upper and lower seem to be confused here ...

>
> OK, it sounds like when you see the variable name spu_pc_lower and
> spu_pc_upper in the above context you are thinking of the trace buffer
> words.  That was not the intention of the variable names.  The
> lower/upper in the name refers to the range of spu numbers 0-3/4-7.
> There was no intention of it having anything to do with the word order
> or how the numbers mapped to the trace[0], trace[1] words.  If it did I
> would have named the variable something like upper_word and lower_word.
> So, given that the context and the use of upper and lower in the
> variable names seems to be the issue, I need to change the code to
> remove the names and use different names that will not contain the 
> upper
> and lower terms.  Do you agree?
>

Yes.

I think you could just remove the parallel lines of code and the
two variables, and just do a loop over num_trace_array_words.
I would expect the compiler should be able to unroll a short loop
of constant count 2.   Of course, a check of the generated assembly
would be in order.

milton




More information about the cbe-oss-dev mailing list