Applied
Thanks for your work on this massive rework.


On Fri, Aug 7, 2009 at 11:42 PM, Corey
Ashford<cjash...@linux.vnet.ibm.com> wrote:
> Hello,
>
> Looking at the code in pfmlib_gen_powerpc.c again, I realized that during
> the change to consolidate the Power arch chips code to use common
> structures, and get rid of switch statements, I made a mistake with the
> group_vector and event_count arrays.
>
> I had made the incorrect assumption that the #defines for PFMLIB_POWER4_PMU
> (and similar) had started at 0 and went to 7, but in reality, these numbers
> start at 110 and go to 117.  The result is that arrays are created which
> have entries 0..109 unused, wasting space.  The attached patch offsets the
> indexes by FIRST_POWER_PMU which is set to the value of PFMLIB_PPC970_PMU
> (110).
>
> Also, as per a recent discussion about the use of malloc() in the dispatch
> call,  I decided to just eliminate the call and use C99's ability to do
> dynamic memory allocation on the stack.  So this patch undoes the recent
> change that checks the return value of malloc(), and the single exit point
> which was used to call free().  Since free is no longer needed, I went back
> to using multiple exit points, because I think the code is more clear that
> way.
>
> Also fixed one place where the indentation inside a loop was wrong.
>
> None of these changes are necessary.  The code works as is, so this is just
> a clean-up and optimization.
>
> Tested on Power5.
>
> Signed-off-by: Corey Ashford <cjash...@us.ibm.com>
>
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to