Date: Sun, 23 Nov 2014 16:22:23 +0000 From: David Chisnall <theraven@FreeBSD.org> To: Scott Long <scott4long@yahoo.com> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Scott Long <scottl@FreeBSD.org>, Rui Paulo <rpaulo@me.com> Subject: Re: svn commit: r274489 - in head/sys/amd64: amd64 include Message-ID: <426D8696-801A-4C48-A2FE-74575B4B79E7@FreeBSD.org> In-Reply-To: <13EC3116-6146-42FC-8941-2C7C009224B3@yahoo.com> References: <201411132211.sADMBjP3009246@svn.freebsd.org> <35E5EAD8-99C1-43C0-8D01-B3B5B86ECA25@me.com> <13EC3116-6146-42FC-8941-2C7C009224B3@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 21 Nov 2014, at 23:26, Scott Long <scott4long@yahoo.com> wrote: > That=92s a good question to look further into. I didn=92t see any = measurable differences with this change. I think that the cost of the = function call itself masks the cost of a few extra instructions, but I = didn=92t test with switching it on/off for the entire kernel [ Note: The following is not specific to the kernel ] The overhead for preserving / omitting the frame pointer is decidedly = nonlinear. On a modern superscalar processor, it will usually be = effectively zero, right up until the point that it pushes something out = of the instruction cache on a hot path, at which point it jumps to = 20-50%, depending on the workload. The performance difference was more pronounced on i386, where having an = extra GPR for the register allocator to use could make a 10-20% = performance difference on some fairly common code (the two big = performance wins for x86-64 over IA32 were the increase in number of = GPRs and an FPU ISA that wasn't batshit insane). For ISAs with more = GPRs, that's less of an issue, although after inlining being able to use = %rbp as a GPR can sometimes make a noticeable difference in performance. = In particular, as %rpb is callee-save, it's very useful to be able to = use it in non-leaf functions. David
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?426D8696-801A-4C48-A2FE-74575B4B79E7>