From owner-svn-src-all@freebsd.org Thu Mar 30 06:42:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 119F2D25F83; Thu, 30 Mar 2017 06:42:04 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CE942D1D; Thu, 30 Mar 2017 06:42:03 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id g2so7657927pge.2; Wed, 29 Mar 2017 23:42:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=4XhWuBSho/BNJjgUCqCOw2L6BznAIsICzejMlu8T4fY=; b=LZvKP+bTmp5FzIwcJ6Ytc0fYZBAmM+SGtOYs/J1OxG0L9pZxM6HXoX5queeZAF77g9 bj5v28ZbX45nxToY3eYiFaSnHuopxnybOnhF1Qu2NfgmoTyRedNebNqJXiG2tg07V8z/ 2vpSmJHqA9i4fp7rlf2YzVjGj69LnfbibK89Hl+RAhjYBfftIx+muW3WW0BHZe2b/NSK zGu0sQxU+QqKZRy9wq3SjKUoIQdPjC87f/zAImdy9SxdvjBGzVt59fLw3DHYmfWG+oxG jOQ1V1UvUXfV3PEd9XEijrKYTYjAXYJVZwmCphrXwOuCru9d6Y6JROOFUFHGA01Yj8+K IJ+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=4XhWuBSho/BNJjgUCqCOw2L6BznAIsICzejMlu8T4fY=; b=JYgesql1LjmazZMPQCQJQeTQyWa6Ct5roGXe0eNroeVJ2yQQFWVhFccUP606aB/5r3 +8AqXhXhweqoCcKeJ+UVelzuawk0Di3fbXP9EaCCyL9xFYJEUZKvcGhb9Aa4/2DdVwpK 4F8EPr5o3FOD/7U0heOqrLwc7o6ETExaQ6jxU+sUqmLeIl5VJRIs0EMsiZ5GVpJ2jOzQ bKag8X+RIoY4SkM8JmV/fG+bluqnrYrjuFzsqvwPVpGQR0hIY8d5fFOQgXT4qS/npTLU 57dHPXqCDcbjInp1lwZEEQpBHfUqwQEVoCJ5Arq8Bxj+ct4XwkfeDbJZtBb2UE3Oi4Ed zYTg== X-Gm-Message-State: AFeK/H1wZNMhjTKQhQtg9IOzcrxnjJQbDzkZpj7HHI5VNbpK4SuC8I0GT/7mze0W2p4S3w== X-Received: by 10.84.218.138 with SMTP id r10mr5075026pli.165.1490856123396; Wed, 29 Mar 2017 23:42:03 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id s3sm1972327pgn.55.2017.03.29.23.42.02 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Mar 2017 23:42:02 -0700 (PDT) Subject: Re: svn commit: r316132 - head/sys/boot/i386/boot2 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_4880892A-64E4-45AC-B7EF-1A27C2BD117F"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Wed, 29 Mar 2017 23:42:00 -0700 Cc: Bruce Evans , Poul-Henning Kamp , John Baldwin , Ngie Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <6B63C559-C48C-4824-9D24-87FF89336FE4@gmail.com> References: <201703290930.v2T9U3x9087583@repo.freebsd.org> <7448826.asYms2TLO2@ralph.baldwin.cx> <46812.1490823365@critter.freebsd.dk> <20170330165329.L1061@besplex.bde.org> To: Warner Losh X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 06:42:04 -0000 --Apple-Mail=_4880892A-64E4-45AC-B7EF-1A27C2BD117F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 29, 2017, at 23:38, Warner Losh wrote: >=20 > On Thu, Mar 30, 2017 at 12:23 AM, Bruce Evans = wrote: >> I doubt that gcc-6.3 is very broken. Did its CFLAGS even have -Os? >=20 > Yes. boot2 doesn't use the kernel CFLAGS. >=20 >> Kernel CFLAGS are still broken even for gcc-4.2, by sprinkling inline >> parameter magic that was more needed for gcc-3.3. The magic isn't >> really right for gcc-4.2, and breaks -Os for kernels. >=20 > There is different magic for boot2. >=20 >> The magic might >> be wronger for gcc-6.3, though it would be a compiler bug to not >> just ignore it if it is nonsense. clang doesn't provide any control >> over inlining AFAIK, but ignores gcc directive to limit it and does >> too much. >=20 > Yes. It does. Hence my glowing review of 6.3 :) But you are right. I'm > likely being overly harsh without commanding enough facts to get past > my preconceived notions... I don't know if this is a simple compiler > bug, lack of proper options, or a need to do things differently. > Latter day versions of gcc have many more knobs to turn here. I don't > know yet if turning any of them will be helpful. I'm looking to > automate the knob turning so that we can at least see which optimizer > options have an effect on the size. I doubt more than half a dozen > have any useful effect on the size, and finding the right combination > likely will suffice. Or we wait for gcc 7 and hope for the best... >=20 > But this is nothing new. gcc 5.4.0 has -504 bytes free. gcc 4.9.4 has > the same. 4.8.5 has -472, etc. It's clear that the magic sweet spot > we're in with the in-tree 4.2.1 compiler isn't the sweet spot for > these compilers... Then again, clang generated bloated like this until > we got boot2 into their test suit, and now we have 100 bytes to spare > there. I know that a handful of people (several years ago) spent a lot of time = making clang work with boot2 and be under the limit. I=E2=80=99m not = entirely sure, but we could have done similar things (but in more = ominous ways in) gcc 4.2.1 to shrink down the boot loader. Just a thought >_>=E2=80=A6 -Ngie --Apple-Mail=_4880892A-64E4-45AC-B7EF-1A27C2BD117F Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY3Ki5AAoJEPWDqSZpMIYVJPkQANXbiVVyuAjHwsxFBz3CYqJl uSjq5TEXru0fKZFv+IRxLQyx7GkBV+Bwgr4UhKs5/9ZAClq0QklUFpi2YnkrvZHN LUsXc7bYoJPGtQGwpvbezJHohMaBwGogky4hsH+KcsFvPltAqOdxUeM3W4JiaCcX c3iKsb8yGeK2Ub3Z5bLq2pInZ3HrImaCUTWvPoJUW9e180glBYApywNdd4KbDoNB Dm32slE+qksLfbGM/KLHIzqKKaGsNTU4Kmj8o2fneOX7Y569/ZcDMo+dv8Eb6Bv0 IT2dnHQuhB3uUbcWhJe34xJPBYvFdE05HFjp2gjGbGnCi4eymOYkAnDobvYc194o OcIMRWJpmkG12pAnCu6uD49rmrbIXYNcHYyrfA9o0yfyrJDFj0lizhP7klS4UAN1 zqytCmWIL194CNHHVapNDYpggHlR/W8BFJeQqovyTzQ7sddj6SOF6h/0Iv8h9xwL jrK0IxS0AwAyJlAAxx55+DIpHnWnrAELwdrfxD2LQ4MM2jvi06TheWkdM55iNTI5 G635BMxX4+QeGjcJ1ca0EGLLSYtvYrjmQxJlrctPhYeq9H5rjTZjffVtZSra9FIj F/OKmWhtpCz/amqWV1oMV9izmeFbdbNAr8grqbFUYyPTKpGNzxCUzPDYcRkt21hY ftE3HwMEaER9m1/idEZH =XZce -----END PGP SIGNATURE----- --Apple-Mail=_4880892A-64E4-45AC-B7EF-1A27C2BD117F--