Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Apr 2012 14:29:40 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Kirk McKusick <mckusick@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r234400 - in head/sys: kern sys
Message-ID:  <20120418135636.C1082@besplex.bde.org>
In-Reply-To: <201204172146.q3HLkxS6000736@svn.freebsd.org>
References:  <201204172146.q3HLkxS6000736@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 17 Apr 2012, Kirk McKusick wrote:

> Log:
>  Drop export of vdestroy() function from kern/vfs_subr.c as it is
>  used only as a helper function in that file. Replace sole call to
>  vbusy() with inline code in vholdl(). Replace sole calls to vfree()
>  and vdestroy() with inline code in vdropl().
>
>  The Clang compiler already inlines these functions, so they do not
>  show up in a kernel backtrace which is confusing. Also you cannot
>  set their frame in kgdb which means that it is impossible to view
>  their local variables. So, while the produced code is unchanged,
>  the debugging should be easier.

gcc-4.2.1 has the same bug, but you can avoid it using
-fno-inline-functions-called-once (not the default).  Unfortunately,
this flag is not even a no-op with clang (it generates an error message).

Inlining of functions called once also breaks profiling.

The breakage for debugging is especially large for primitive debuggers
like ddb.  Without line numbers, it is difficult to even find the code
for small functions when they are inlined into big functions.   With
full symbol table info, it should be possible to display inlined functions
as if they weren't inlined, especially if they aren't declared inline,
but I've never seen a debugger than can even step over them properly
using 'n'.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120418135636.C1082>