From owner-cvs-all@FreeBSD.ORG Wed Apr 30 18:49:47 2008 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89F1C1065671; Wed, 30 Apr 2008 18:49:47 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.79]) by mx1.freebsd.org (Postfix) with ESMTP id 642888FC21; Wed, 30 Apr 2008 18:49:47 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (asmtp007-s [10.150.69.70]) by smtpoutm.mac.com (Xserve/smtpout016/MantshX 4.0) with ESMTP id m3UInkVh010419; Wed, 30 Apr 2008 11:49:46 -0700 (PDT) Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mac.com (Xserve/asmtp007/MantshX 4.0) with ESMTP id m3UInc61007241 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 30 Apr 2008 11:49:39 -0700 (PDT) Message-Id: <42F8226A-A63D-44AB-8BF7-A74233520F24@mac.com> From: Marcel Moolenaar To: Julian Elischer In-Reply-To: <4818BCEF.1040308@elischer.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Wed, 30 Apr 2008 11:49:38 -0700 References: <200804292123.m3TLNLwT044155@repoman.freebsd.org> <200804301939.06987.max@love2party.net> <4818BCEF.1040308@elischer.org> X-Mailer: Apple Mail (2.919.2) Cc: Max Laier , src-committers@freebsd.org, Julian Elischer , cvs-all@freebsd.org, cvs-src@freebsd.org Subject: Re: cvs commit: src/sys/net if_ethersubr.c src/sys/sys mbuf.h src/sys/kern uipc_mbuf.c src/sys/conf NOTES options X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2008 18:49:47 -0000 On Apr 30, 2008, at 11:39 AM, Julian Elischer wrote: > Max Laier wrote: >> On Tuesday 29 April 2008 23:23:21 Julian Elischer wrote: >>> julian 2008-04-29 21:23:21 UTC >>> >>> FreeBSD src repository >>> >>> Modified files: >>> sys/net if_ethersubr.c >>> sys/sys mbuf.h >>> sys/kern uipc_mbuf.c >>> sys/conf NOTES options >>> Log: >>> Add an option (compiled out by default) >>> to profile outoing packets for a number of mbuf chain >>> related parameters >>> e.g. number of mbufs, wasted space. >>> probably will do with further work later. >> This breaks the build: >> http://tinderbox.freebsd.org/tinderbox-head-HEAD-amd64-amd64.brief >> 1) Use %u to print unsigned values >> 2) printing [u]int64_t's has been broken since the beginning. The >> reason is the unfortunate choice to have int64_t be a "long int" >> alias on platforms with a 64bit long (while they could as easily be >> "long long int" as on the other platforms where long is 32bit wide >> - this also means that "long long" is > intmax_t which is an alias >> for int64_t). Hence you either have to use the (ugly) PRIu64 >> macro, or %ju and cast to uintmax_t. This is a no-op (as long as >> we don't have uint128_t or the like). > > I'm happy to change the types to any way you suggest.. > how about just changing them to long long? I hope you don't mean redefining [u]int64_t from [u_]long to [u_]long_long on 64-bit platforms? I violently oppose that. Itanium already supports 128-bit atomic operations and I like like to keep long long available for that... Not to mention that PRIu64 is defined exactly for this issue, so I would suggest that people get over their eye-of-beholder objections and just use it (if casting to long long and sing %llu is not an option)... FYI, -- Marcel Moolenaar xcllnt@mac.com