Date: Wed, 24 Oct 2018 13:23:02 -0400 From: Mark Johnston <markj@freebsd.org> To: Ryan Stone <rysto32@gmail.com> Cc: lev@freebsd.org, freebsd-hackers@freebsd.org, Conrad Meyer <cse.cem@gmail.com>, Alan Somers <asomers@freebsd.org> Subject: Re: What is wrong with dtrace's stack()? Message-ID: <20181024172302.GF45118@raichu> In-Reply-To: <CAFMmRNzSAVfGywx%2BPfkQ1Oq1Lt3c53FFQpxDagnkdN=AYQqBCA@mail.gmail.com> References: <CAG6CVpVCe-8OVU%2BKEyAh8swFSAjRshNcNLN0tjAS3W8bZxyrTA@mail.gmail.com> <475670271.20181022003734@serebryakov.spb.ru> <CAOtMX2goztCYJXM72WNR711DEBEKAGk1zFHF=NpE4UiVAF2bAQ@mail.gmail.com> <234d745d-37a9-9610-15b9-0f5cd5af21bf@FreeBSD.org> <b30f2080-1037-1752-60fb-6d22e28ce90d@FreeBSD.org> <CAFMmRNz35Ay82NcMnUkSAvpyU5p2m9ykiji1xXcbEanH9A2H%2Bw@mail.gmail.com> <168122586.20181024003412@serebryakov.spb.ru> <CAFMmRNxbu=V6F9LW_6oWeQzws%2B1-UhETC%2BWWGMFGKAoH-5Ajjw@mail.gmail.com> <c7e9aa2f-8efa-6f48-d4b1-3705928803b2@FreeBSD.org> <CAFMmRNzSAVfGywx%2BPfkQ1Oq1Lt3c53FFQpxDagnkdN=AYQqBCA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 24, 2018 at 01:14:10PM -0400, Ryan Stone wrote: > ia32_pause() is an inline function. How does dtrace map instruction > pointers to symbol names? It uses a kernel linker API whose implementation searches the symbol tables of the kernel and loaded KLDs. > Is it getting that mapping from some CTF > data, and is that CTF data aware of inline functions? No, and no. CTF does include a function table, but that's just for encoding function parameter and return types. Functions that get inlined into every caller (as I'd expect with ia32_pause()) shouldn't be showing up in stack traces. There is no ia32_pause() symbol in my kernel; presumably the observed behaviour is related to some non-default compiler flags being used, but I haven't carefully read through the whole thread to see. > If so, I'd argue that behaviour is counter-intuitive and unhelpful, as > this example here shows.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181024172302.GF45118>