From: Zack Weinberg <zack@codesourcery.com>
Date: Sat Mar 12, 2005 3:10:37 PM US/Pacific
To: Caroline Tice <ctice@apple.com>
Subject: Re: [PATCH] Hot/cold partitioning fixes
My most important concern: Could you talk a little about why you now
impose the constraint that all the 'hot' blocks come before all the
'cold' blocks? The need is not obvious to me, and it seems to cause a
substantial number of complications (esp. in bb-reorder.c).
I would also like to point out that this construct
+ {
+ len = strlen (UNLIKELY_EXECUTED_TEXT_SECTION_NAME);
+ unlikely_text_section_name = xmalloc (len+1 * sizeof (char));
+ strcpy (unlikely_text_section_name,
+ UNLIKELY_EXECUTED_TEXT_SECTION_NAME);
+ }
would be better spelled
unlikely_text_section_name
= xstrdup (UNLIKELY_EXECUTED_TEXT_SECTION_NAME);
Furthermore, never write "sizeof(char)" -- it is 1 by definition.
I will provide more detailed comments in a day or two.
zw