Functions not getting picked up by dtrace

hiren panchasara hiren at strugglingcoder.info
Mon Feb 29 22:07:46 UTC 2016


On 02/29/16 at 01:49P, hiren panchasara wrote:
> On 02/29/16 at 01:49P, Mark Johnston wrote:
> > On Mon, Feb 29, 2016 at 01:39:33PM -0800, hiren panchasara wrote:
> > > I've seen this earlier with others too but this one is the latest
> > > confusing me: em_xmit() in $src/dev/e1000/if_em.c
> > > 
> > > Other functions with similar signature are listed in 'dtrace -l'.
> > 
> > em_xmit() is a static function with a single call site, so it's getting
> > inlined into its caller. DTrace FBT can't instrument inlined functions.
> > 
> > > 
> > > Is is because of some optimization? How do I undo it for testing
> > > purposes?
> > 
> > There's a __noinline attribute that you can use for this.
> 
> Thanks, Mark.
> 
> cem on irc also explained the "why" part.

Davide pointed out that it _might_ be possible that compiler change the
way it decides what to inline and non-static functions can also get
hidden that way from dtrace.

In any case, the sure way seems to add __noinline.

Cheers,
Hiren
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 603 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-dtrace/attachments/20160229/7c1fc927/attachment.sig>


More information about the freebsd-dtrace mailing list