Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Sep 2018 10:13:24 -0500
From:      Eric van Gyzen <eric@vangyzen.net>
To:        Mateusz Guzik <mjg@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r338829 - head/sys/kern
Message-ID:  <67e2771b-a680-221f-2451-9906d91f58d3@vangyzen.net>
In-Reply-To: <201809201332.w8KDWeX4014010@repo.freebsd.org>
References:  <201809201332.w8KDWeX4014010@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 9/20/18 8:32 AM, Mateusz Guzik wrote:
>    fd: prevent inlining of _fdrop thorough kern_descrip.c
>    
>    fdrop is used in several places in the file and almost never has to call
>    _fdrop. Thus inlining it is a pure waste of space.
>    

> -int
> +int __noinline
>   _fdrop(struct file *fp, struct thread *td)

I wonder if some compilers have an attribute for "cold" versus "hot" 
that would indicate that the function is called seldom versus often.  It 
could influence not only inlining, but also prediction of branches that 
lead to an unconditional call to it.

Eric



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?67e2771b-a680-221f-2451-9906d91f58d3>