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
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to