From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 10 21:24:51 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31DD81065672 for ; Sun, 10 Jun 2012 21:24:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 75CA28FC0C for ; Sun, 10 Jun 2012 21:24:50 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id AAA21406; Mon, 11 Jun 2012 00:24:47 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Sdpct-0000BW-6X; Mon, 11 Jun 2012 00:24:47 +0300 Message-ID: <4FD5109D.5090107@FreeBSD.org> Date: Mon, 11 Jun 2012 00:24:45 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: Ryan Stone References: <4FD490D5.1070207@FreeBSD.org> <20120610152721.3b627896@fabiankeil.de> <4FD4CD8B.1080803@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org, Fabian Keil Subject: Re: decoding of multi-byte nops in dtrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jun 2012 21:24:51 -0000 on 10/06/2012 23:40 Ryan Stone said the following: > On Sun, Jun 10, 2012 at 12:38 PM, Andriy Gapon wrote: >> Interesting observations, thank you. >> Do you use -O2 or higher optimization for kernel/modules build? >> I use only -O1. >> >> Here are some stats from my system: >> $ dtrace -ln fbt::: | fgrep -c entry >> 16876 >> $ dtrace -ln fbt::: | fgrep -c return >> 16729 >> >> So, 147 functions without return probe. > > Try re-compiling with -foptimize-sibling-calls. That enables the tail > call optimization in gcc, and therefore you get many functions with no > ret instruction (and thus no return probe in DTrace) No, thank you :-) I switched from -O2 to -O1 exactly for this reason (among a few others), although -fno-optimize-sibling-calls would be a more targeted solution. -- Andriy Gapon