From owner-freebsd-ppc@FreeBSD.ORG Sun Sep 15 00:24:09 2013 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 061FB416 for ; Sun, 15 Sep 2013 00:24:09 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pb0-x232.google.com (mail-pb0-x232.google.com [IPv6:2607:f8b0:400e:c01::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B11A4242D for ; Sun, 15 Sep 2013 00:24:08 +0000 (UTC) Received: by mail-pb0-f50.google.com with SMTP id uo5so2648544pbc.23 for ; Sat, 14 Sep 2013 17:24:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=tcMtUpg5iKWGB1hPjwG2t02SVuaORswtgJYT/yWXfwY=; b=C7xQliIO+RcH6aPLCeZvdAq8owOi+fiEiOmvbj6SzWPHJpteu1HRvhb7DlZ+q5TwQz fk+ONLw4+ojjekPzr0teVROnCSjBd7mLbcYcU+VCSzWjTRQnK0Q2a9I+fiLwonT65lgG 1am5InV6wpLfxrUBKJzr5SHLTEOMxmQXonb1I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=tcMtUpg5iKWGB1hPjwG2t02SVuaORswtgJYT/yWXfwY=; b=JIJsewN+YXpsNSs0sFfbRhnGLu3rR4GS6Q7jyGpfFR3aQl5y0dLXZdU69kUUAaOh5f l9lf6ZGfEROLF02MEUAyUElzkY+gjiYZwCXB0QLiNDy74grxX9KHUOUpv+ikN0wwg0Ch tX0k3k9No/jeMQimIdPZ/f1u5k91fmE3bT0e9NQROd/+dC/aHomf3DF7HCvM3fT4/n0j g3RDVF0SS+WH0tvEHyl//jqn++UJjQis2Yo67mM/oDsd1qwU31dWg4bpNEUUwR9qcIn2 CSw3q6OKQzg95nLFYu9bY5jIwx8dxUTwPs6GVhCRkOSWlOdpDbkfPJpXESFGuAMmsaVw LRnQ== X-Gm-Message-State: ALoCoQkze0J49BtAUUGTGIY2F0S+wYLY0tTAE8Yd345GoHfsAZuCvsgFJ/C5hmjTEhL0kHWnnecj X-Received: by 10.68.143.38 with SMTP id sb6mr21242449pbb.44.1379204648068; Sat, 14 Sep 2013 17:24:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.70.6.3 with HTTP; Sat, 14 Sep 2013 17:23:37 -0700 (PDT) In-Reply-To: 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> From: Eitan Adler Date: Sat, 14 Sep 2013 20:23:37 -0400 Message-ID: Subject: Re: Patch for Cross-Reference Phandles To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 Cc: freebsd-sparc64 , John-Mark Gurney , "freebsd-arm@freebsd.org" , Ian Lepore , FreeBSD PowerPC ML X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 00:24:09 -0000 On Sat, Sep 14, 2013 at 8:06 PM, Adrian Chadd wrote: > On 14 September 2013 17:04, Eitan Adler 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