From: Jiri Olsa <jolsa@redhat.com>
To: Jeff Merkey <linux.mdb@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Andy Lutomirski <luto@amacapital.net>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
X86 ML <x86@kernel.org>, Peter Zijlstra <peterz@infradead.org>,
Andy Lutomirski <luto@kernel.org>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Steven Rostedt <rostedt@goodmis.org>,
Borislav Petkov <bp@alien8.de>, Jiri Olsa <jolsa@kernel.org>
Subject: Re: x86_64 Compiler Output Kernel Bloat v4.4
Date: Tue, 19 Jan 2016 08:39:30 +0100 [thread overview]
Message-ID: <20160119073930.GA20358@krava.brq.redhat.com> (raw)
In-Reply-To: <CAO6TR8WW6Nkc-StZLHD5_FcF4SjajfQMsrchQVH6-+WYzc2-7A@mail.gmail.com>
On Mon, Jan 18, 2016 at 02:45:14PM -0700, Jeff Merkey wrote:
SNIP
> > 0xffffffffa073e019 E8C2579FE0 call touch_softlockup_watchdog_sync
> > 0xffffffffa073e01e E87D2B9BE0 call clocksource_touch_watchdog
> > 0xffffffffa073e023 E8F8099AE0 call rcu_cpu_stall_reset
> > 0xffffffffa073e028 E893579FE0 call touch_nmi_watchdog
> > 0xffffffffa073e02d 5D pop rbp
> > 0xffffffffa073e02e 6690 data16
> > 0xffffffffa073e030 C3 ret
> > 0xffffffffa073e031 6666666666662E0F1F840000000000 nop cs:WORD PTR
> > [rax+rax]=0x0000
> > mdb|mdb:
> > 0xffffffffa073e040 0F1F440000 nop DWORD PTR [rax+rax]=0x0 <<
> > 0xffffffffa073e045 55 push rbp
> > 0xffffffffa073e046 4889E5 mov rbp,rsp
> > 0xffffffffa073e049 4157 push r15
> > 0xffffffffa073e04b 4156 push r14
> > 0xffffffffa073e04d 4989FE mov r14,rdi
> > 0xffffffffa073e050 4155 push r13
> > (0)> g
> >
> > Jeff
> >
>
> I think xor eax,eax is a lot shorter and fewer bytes.
that 5 byte nop gets replaced by call instruction once the
function trace is enabled
explained in CONFIG_FUNCTION_TRACER option doc:
config FUNCTION_TRACER
bool "Kernel Function Tracer"
depends on HAVE_FUNCTION_TRACER
select KALLSYMS
select GENERIC_TRACER
select CONTEXT_SWITCH_TRACER
help
Enable the kernel to trace every kernel function. This is done
by using a compiler feature to insert a small, 5-byte No-Operation
instruction at the beginning of every kernel function, which NOP
sequence is then dynamically patched into a tracer call when
tracing is enabled by the administrator. If it's runtime disabled
(the bootup default), then the overhead of the instructions is very
small and not measurable even in micro-benchmarks.
jirka
next prev parent reply other threads:[~2016-01-19 7:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-18 21:29 Jeff Merkey
2016-01-18 21:34 ` Jeff Merkey
2016-01-18 21:45 ` Jeff Merkey
2016-01-18 21:45 ` Jeff Merkey
2016-01-18 22:12 ` Mihai Donțu
2016-01-19 7:39 ` Jiri Olsa [this message]
2016-01-19 15:32 ` Jeff Merkey
2016-01-19 15:47 ` Jeff Merkey
2016-01-20 14:40 ` Steven Rostedt
2016-01-20 14:46 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160119073930.GA20358@krava.brq.redhat.com \
--to=jolsa@redhat.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux.mdb@gmail.com \
--cc=luto@amacapital.net \
--cc=luto@kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®