From owner-freebsd-arm@FreeBSD.ORG Sun Sep 15 00:24:09 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 09AED417 for ; Sun, 15 Sep 2013 00:24:09 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pd0-x235.google.com (mail-pd0-x235.google.com [IPv6:2607:f8b0:400e:c02::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B31B2242E for ; Sun, 15 Sep 2013 00:24:08 +0000 (UTC) Received: by mail-pd0-f181.google.com with SMTP id g10so2707270pdj.12 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=f5t6Vfw5sxiRqheadZ8CRXc4pIp956DpPk5PW7yN3/M8S04aS51h7UB+piGCDKgjU0 ZQDu7ypmvYPVI19aUxW7PdueWc+Jh9OsLviGPTBQXE44hZ9uD4LKgf+hkMqlqujQ+Fz4 +7sZIlmEJKK8EDwoZRwwzfQzARsEgHQp3TP/t3ivN4kRMEbqy2aRclvrr3Djvo0a2kza nplBe3x+EQiQVJfA+Cq5V/SszORlE4zJVMVDWLWAVwO/RQx7phnQXKdDPH+u7+r/21Sv ZmvGywqsDbuQKnbBNjLFXkHFlJRVFFeoK0wJmMnm1xEd5Dq4pNA3KU5fLecm/onzjTDY cZSw== X-Gm-Message-State: ALoCoQn3SN/UkI/5AvFjdNuyIdyqivf+me/0geNg2c6iwwamku34eFECnBEDqi5itW1dgp3txoFC 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-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor 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