Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 May 2014 14:04:48 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans <brde@optusnet.com.au>
Subject:   Re: svn commit: r266238 - head/contrib/ldns/ldns
Message-ID:  <20140517123901.I1213@besplex.bde.org>
In-Reply-To: <86ppjdjg2c.fsf@nine.des.no>
References:  <201405161532.s4GFWGvh006504@svn.freebsd.org> <20140517112645.N925@besplex.bde.org> <86ppjdjg2c.fsf@nine.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 17 May 2014, [utf-8] Dag-Erling Sm=C3=B8rgrav wrote:

> Bruce Evans <brde@optusnet.com.au> writes:
>> -Wcast-qual is especially onerous in contrib'ed code written to a lower
>> standard.
>
> Well, I could have just lowered WARNS...  LDNS actually isn't that bad.
> Unbound is much worse.
>
>> Converting this to use system endianness conversion functions wouldn't
>> take much more churn.
>
> Do our standard endianness conversion functions handle unaligned
> accesses?

Yes.  They intentionally use pessimal bytewise accesses for everything.

However, clang optimizes away all the pessimizations in many useful
cases, at last on amd64.  This depends on the functions being inline.
When clang can see that the pointed-to object is aligned, it generates
minimal code (at most a load-store for a null conversion, and I think
at most a load-bswap-store for a swapping conversion (I only checked
related cases for the latter)).  The case where the pointed-to object
is just an array of uint8_t is still pessimized.  Callers wanting to
avoid the pessimal case can avoid it by copying from the array to a
local variable.

gcc-4-2.1 doesn't optimize away any of the pessimizations.  However,
in even more complicated conversions in FP code, it optimizes the
union hack just as well as clang.

Bruce
From owner-svn-src-all@FreeBSD.ORG  Sat May 17 04:06:55 2014
Return-Path: <owner-svn-src-all@FreeBSD.ORG>
Delivered-To: svn-src-all@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 ESMTPS id 4A139ACD;
 Sat, 17 May 2014 04:06:55 +0000 (UTC)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 3802729C7;
 Sat, 17 May 2014 04:06:55 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4H46tnA069217;
 Sat, 17 May 2014 04:06:55 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
 by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4H46se3069216;
 Sat, 17 May 2014 04:06:55 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201405170406.s4H46se3069216@svn.freebsd.org>
From: John Baldwin <jhb@FreeBSD.org>
Date: Sat, 17 May 2014 04:06:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r266296 - head/usr.bin/procstat
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>;
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 17 May 2014 04:06:55 -0000

Author: jhb
Date: Sat May 17 04:06:54 2014
New Revision: 266296
URL: http://svnweb.freebsd.org/changeset/base/266296

Log:
  Correct some minor nits in the per-thread signal format description such
  as missing posessives and misordering of fields.
  
  MFC after:	1 week

Modified:
  head/usr.bin/procstat/procstat.1

Modified: head/usr.bin/procstat/procstat.1
==============================================================================
--- head/usr.bin/procstat/procstat.1	Sat May 17 04:00:18 2014	(r266295)
+++ head/usr.bin/procstat/procstat.1	Sat May 17 04:06:54 2014	(r266296)
@@ -63,7 +63,7 @@ Display file descriptor information for 
 .It Fl i
 Display signal pending and disposition information for the process.
 .It Fl j
-Display signal pending and blocked information for the process threads.
+Display signal pending and blocked information for the process's threads.
 .It Fl k
 Display the stacks of kernel threads in the process, excluding stacks of
 threads currently running on a CPU and threads with stacks swapped to disk.
@@ -267,15 +267,15 @@ If
 .Fl n
 switch is given, the signal numbers are shown instead of signal names.
 .Ss Thread Signal Information
-Display signal pending and blocked for a process threads:
+Display signal pending and blocked for a process's threads:
 .Pp
 .Bl -tag -width ident -compact
 .It PID
 process ID
-.It COMM
-command
 .It TID
 thread ID
+.It COMM
+command
 .It SIG
 signal name
 .It FLAGS
@@ -292,7 +292,7 @@ The
 .Fl n
 switch has the same effect as for the
 .Fl i
-switch, the signals numbers are shown instead of signal names.
+switch: the signal numbers are shown instead of signal names.
 .Ss Kernel Thread Stacks
 Display kernel thread stacks for a process, allowing further interpretation
 of thread wait channels.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140517123901.I1213>