lkml.org 
[lkml]   [2016]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: x86_64 Compiler Output Kernel Bloat v4.4
On Mon, 18 Jan 2016 14:45:48 -0700 Jeff Merkey wrote:
> On 1/18/16, Jeff Merkey <linux.mdb@gmail.com> wrote:
> > On 1/18/16, Jeff Merkey <linux.mdb@gmail.com> wrote:
> > > I noticed that in the assembler output for the x86_64 builds almost
> > > every single function originating from C code has a nop instruction
> > > that prefaces the function call. I guess the concern with this is
> > > the wasted space issue as each one of these placeholders takes up a
> > > bunch of bytes at the head of each function. Is there a reason this
> > > assembler header is there in the first place to anyones knowledge?
> > > Since every single function just about is prefaced by this inert 5
> > > byte instruction it adds up to quite a bit of bloat in the size of the
> > > linux executable.

If I'm not mistaking, those bytes are used to dynamically enable ftrace:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/trace/ftrace-design.txt

--
Mihai Donțu

\
 
 \ /
  Last update: 2016-01-18 23:21    [W:0.070 / U:1.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site