Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Jun 2013 18:30:07 -0400
From:      Ryan Stone <rysto32@gmail.com>
To:        Navdeep Parhar <np@freebsd.org>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: missing DTrace FBT return probes
Message-ID:  <CAFMmRNzj2LhsdxankJV5CT6yHy8J%2BzyL-YBzFRUSKz%2Bq-ZTSNw@mail.gmail.com>
In-Reply-To: <51AFB2B3.5050105@FreeBSD.org>
References:  <51AFB2B3.5050105@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 5, 2013 at 5:50 PM, Navdeep Parhar <np@freebsd.org> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFMmRNzj2LhsdxankJV5CT6yHy8J%2BzyL-YBzFRUSKz%2Bq-ZTSNw>