Date: Sun, 10 Jun 2012 19:38:35 +0300 From: Andriy Gapon <avg@FreeBSD.org> To: Fabian Keil <freebsd-listen@fabiankeil.de> Cc: freebsd-hackers@FreeBSD.org Subject: Re: decoding of multi-byte nops in dtrace Message-ID: <4FD4CD8B.1080803@FreeBSD.org> In-Reply-To: <20120610152721.3b627896@fabiankeil.de> References: <4FD490D5.1070207@FreeBSD.org> <20120610152721.3b627896@fabiankeil.de>
next in thread | previous in thread | raw e-mail | index | archive | help
on 10/06/2012 16:27 Fabian Keil said the following: > Andriy Gapon <avg@FreeBSD.org> wrote: > >> It seems that the $subj is missing :-) >> In my environment that causes many functions to not have fbt return probe, >> because function body decoding fails before 'ret' is found. >> >> Here is my attempt at fixing the problem: >> http://people.freebsd.org/~avg/fbt-nop.patch >> Reviews and suggestions are welcome. > > The patch seems to reduce the number of missing > fbt return probes by about 50% for me. > > Without the patch: > > fk@r500 /usr/src $sudo dtrace -ln fbt::: | grep -c entry > 23395 > fk@r500 /usr/src $sudo dtrace -ln fbt::: | grep -c return > 16739 > > With the patch (and updated kernel sources): > > fk@r500 ~ $sudo dtrace -ln fbt::: | grep -c entry > 23409 > fk@r500 ~ $sudo dtrace -ln fbt::: | grep -c return > 19879 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. >From a quick look at them they all seem to really never return. Either they are noreturn type such panic, or functions that always call the functions of the first type, or functions with endless loops in them such as top level functions of many system threads. -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FD4CD8B.1080803>