Author: mjg
Date: Thu Sep 20 13:32:40 2018
New Revision: 338829
URL: https://svnweb.freebsd.org/changeset/base/338829
Log:
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.
Approved by: re (kib)
Modified:
head/sys/kern/kern_descrip.c
Modified: head/sys/kern/kern_descrip.c
==============================================================================
--- head/sys/kern/kern_descrip.c Thu Sep 20 13:29:43 2018
(r338828)
+++ head/sys/kern/kern_descrip.c Thu Sep 20 13:32:40 2018
(r338829)
@@ -2936,8 +2936,11 @@ fgetvp_write(struct thread *td, int fd, cap_rights_t *
/*
* Handle the last reference to a file being closed.
+ *
+ * Without the noinline attribute clang keeps inlining the func thorough this
+ * file when fdrop is used.
*/
-int
+int __noinline
_fdrop(struct file *fp, struct thread *td)
{
int error;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"