Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Sep 2013 20:23:37 -0400
From:      Eitan Adler <lists@eitanadler.com>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        freebsd-sparc64 <freebsd-sparc64@freebsd.org>, "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>, Ian Lepore <ian@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Re: Patch for Cross-Reference Phandles
Message-ID:  <CAF6rxgnDd3uYg7dJHg4AcG_Y1S2dTH_i-ZcsWuFZ%2BJKFT7WW6w@mail.gmail.com>
In-Reply-To: <CAJ-Vmo=_7oBjyrkAw=-mYzOgQr_GL0K1C%2B78u%2BmQRbxm6Nrjtw@mail.gmail.com>
References:  <522CC7E0.9060508@freebsd.org> <5231D8A6.9080501@freebsd.org> <20130914133155.GA32845@alchemy.franken.de> <52346D71.4080407@freebsd.org> <1379173405.1197.7.camel@revolution.hippie.lan> <20130914172735.GX68682@funkthat.com> <1379181341.1197.26.camel@revolution.hippie.lan> <CAJ-Vmonk_cjc%2BwfCqsHdVESMvRMQTP4c2myK9jZr_%2B59GmWLQQ@mail.gmail.com> <CAF6rxgmiYxEEBtK2Rt0-PoKfu8MP6gow%2B-Ncx7Ma3LFzGd8e9w@mail.gmail.com> <CAJ-Vmo=_7oBjyrkAw=-mYzOgQr_GL0K1C%2B78u%2BmQRbxm6Nrjtw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Sep 14, 2013 at 8:06 PM, Adrian Chadd <adrian@freebsd.org> wrote:
> On 14 September 2013 17:04, Eitan Adler <lists@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF6rxgnDd3uYg7dJHg4AcG_Y1S2dTH_i-ZcsWuFZ%2BJKFT7WW6w>