From owner-freebsd-sparc64@FreeBSD.ORG Sun Sep 15 00:24:09 2013 Return-Path: Delivered-To: freebsd-sparc64@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 DE0FB414 for ; Sun, 15 Sep 2013 00:24:08 +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 ADC3C242C for ; Sun, 15 Sep 2013 00:24:08 +0000 (UTC) Received: by mail-pb0-f50.google.com with SMTP id uo5so2677579pbc.37 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=OzPtzYxo4iKJtnyF27AUqOZdqMcpFqcUCJhvDVfg1swNqg7lAaRZ+PIxEGE5SJBlbh dTt36clNxklEIouJnNhXQvVmwxQ5FLXnH95UC8DOKX7wTeJQcXoua0a/+njt07IOyoG2 hXx3kLkeR3epIZ3QibSMQtFhY0yvx8cHXViaHrIMa98C/hMFtK3APvJ2kiyq6EfyDGsT Snu05hbwxRUSh0Oi+LF9djuVRJ9snVSx0Q7NC4X1gGWLa4+WJLVvWLAnlSiQKow92T+p v8zwu6jUslZbIW9KohYLF36LOkNVAhxhsPRT073PlpYycfRsNuDE7Lm2jAMRZOUbmtlq 9dvw== X-Gm-Message-State: ALoCoQkvrMIyUy+T+L+r4QhgtgNSwbsEfqdUMKZLyhZSDDSLxNgz3ciTC5YtYEvupm71vtwZpj7l 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 , "freebsd-arm@freebsd.org" , Ian Lepore , FreeBSD PowerPC ML X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the Sparc 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