Date: Thu, 13 Nov 2014 16:33:18 +0000 From: "Grier, James" <Grier@netapp.com> To: "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org> Subject: missing DTrace FBT return probes Message-ID: <AD83D10D-C58C-4A6F-93B7-62592C973919@netapp.com>
next in thread | raw e-mail | index | archive | help
On Wed, Jun 5, 2013 at 5:50 PM, Navdeep Parhar <np at 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 By trial and error, I discovered that it’s ‘-funit-at-a-time’ that does the dirty work, so using ‘-fno-unit-at-a-time’ with -O2 we get all the return fbt probes. I haven’t determined the performance impact of this.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AD83D10D-C58C-4A6F-93B7-62592C973919>
