From owner-freebsd-arch@FreeBSD.ORG Wed Jun 5 22:30:08 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 95F19B43; Wed, 5 Jun 2013 22:30:08 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ob0-x22c.google.com (mail-ob0-x22c.google.com [IPv6:2607:f8b0:4003:c01::22c]) by mx1.freebsd.org (Postfix) with ESMTP id 59BE317E8; Wed, 5 Jun 2013 22:30:08 +0000 (UTC) Received: by mail-ob0-f172.google.com with SMTP id wo10so3599411obc.17 for ; Wed, 05 Jun 2013 15:30:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=bHOLE2XP1WgUI1hUFjt2jOCU/viogJ1raRYhaOlV3BM=; b=Ex3Gr6gBxZi3gsx3VDRBzWXiNUTctB9gtR1XbibM7mmITXrUrcGq3ToGT/jSjmTZEM h3k0t+QIkzSk19RHCkJPIk2ODR9w/A+cqutdaj7dW4vnY/1CR0yBUKPXIbQ/W6WCNT6Y 7q1ddL+ad0JBnJ0rALmAY7jwuDxNklURgeaL2flcU+G1x4OvySS4+Afma/4kB99VKswk dPAcVxS1pTkvAGDg6CLT/dbOQtYrZIMo8gm6arnB0NsvNGt45xoRSQF0a9wYgjkPsLIF YqAeKUkwG1QIAqFoWoGqePSTxBYCfCHRVZ3htL8OBAVWfRW+3l1ejW5UudzNDBDO2Tvt lM9Q== MIME-Version: 1.0 X-Received: by 10.60.118.1 with SMTP id ki1mr7709713oeb.44.1370471407952; Wed, 05 Jun 2013 15:30:07 -0700 (PDT) Received: by 10.76.91.163 with HTTP; Wed, 5 Jun 2013 15:30:07 -0700 (PDT) In-Reply-To: <51AFB2B3.5050105@FreeBSD.org> References: <51AFB2B3.5050105@FreeBSD.org> Date: Wed, 5 Jun 2013 18:30:07 -0400 Message-ID: Subject: Re: missing DTrace FBT return probes From: Ryan Stone To: Navdeep Parhar Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jun 2013 22:30:08 -0000 On Wed, Jun 5, 2013 at 5:50 PM, Navdeep Parhar wrote: > A large number of kernel functions have an FBT entry probe but no return > probe. I believe this is due to tail call optimization by the compiler. > Should we disable this optimization for kernel configs that have DTrace > support? The missing return probes make it very difficult to write > DTrace scripts that want to set flags etc. at function entry and then > clean them up on return. > > A quick sample from a recent HEAD shows ~4000 out of ~27000 functions > are missing return probes. See the list of functions in these files > (the ones listed in entry-only.txt do not have return probes). > > http://people.freebsd.org/~np/entry-only.txt > http://people.freebsd.org/~np/entry.txt > http://people.freebsd.org/~np/return.txt > > Regards, > Navdeep > > > dtrace -ln fbt:::entry | sed -e 's/.* *\(.*\) entry$/\1/g' | sort > > entry.txt > dtrace -ln fbt:::return | sed -e 's/.* *\(.*\) return$/\1/g' | sort > > return.txt > comm -23 entry.txt return.txt > entry-only.txt > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" > I would be in favour of turning this on unconditionally, along with -fno-inline-functions-called-once and -fno-omit-frame-pointer. All of the optimizations are of dubious value and significantly impact debugging tools like dtrace and pmc.