Patch for Cross-Reference Phandles
Eitan Adler
lists at eitanadler.com
Sun Sep 15 00:24:09 UTC 2013
On Sat, Sep 14, 2013 at 8:06 PM, Adrian Chadd <adrian at freebsd.org> wrote:
> On 14 September 2013 17:04, Eitan Adler <lists at eitanadler.com> wrote:
>
>>
>> With an explicit zeroing:
>>
>> text data bss dec hex filename
>> 1572 484 16 2072 818 a.out
>>
>> Without:
>>
>> text data bss dec hex filename
>> 1572 484 16 2072 818 a.out
>
>
> This is exactly the opposite of what I see with kernel code though. Eg,
> kern_umtx.c and it's very large up-front allocated array. Same as the
> upfront array of KTR entries for early boot tracing.
>
> Try bumping it to something stupid like 65536 and retest?
>
> Is this a gcc-4.2 versus clang difference?
#ifdef EXPLICIT
int foo[65536] = { 0 };
#else
int foo[65536];
#endif
int main()
{
int i;
for (i = 0; i < 2; i++) {
foo[i] = i;
}
}
No optimizations.
text data bss dec hex filename
1572 484 262152 264208 40810 clang-explicit
1572 484 262160 264216 40818 clang-implicit
1508 456 262184 264148 407d4 gcc46-explicit
1508 456 262176 264140 407cc gcc46-implicit
1652 456 262184 264292 40864 gcc49-explicit
1652 456 262176 264284 4085c gcc49-implicit
I'm not sure of the cause of the 8 byte difference.
--
Eitan Adler
More information about the freebsd-ppc
mailing list