From: Masami Hiramatsu <mhiramat@redhat.com>
To: Tim Abbott <tabbott@ksplice.com>
Cc: Ingo Molnar <mingo@elte.hu>,
Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
lkml <linux-kernel@vger.kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jim Keniston <jkenisto@us.ibm.com>,
Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
Christoph Hellwig <hch@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>,
Anders Kaseorg <andersk@ksplice.com>,
systemtap <systemtap@sources.redhat.com>,
DLE <dle-develop@lists.sourceforge.net>
Subject: Re: [RFC][ PATCH -tip 0/6] kprobes: Kprobes jump optimization support
Date: Wed, 17 Jun 2009 18:27:34 -0400 [thread overview]
Message-ID: <4A396DD6.2050002@redhat.com> (raw)
In-Reply-To: <4A381F8A.8020105@redhat.com>
Masami Hiramatsu wrote:
>> (1) The compiler is allowed to do cross-function optimization within a
>> compilation unit where code in one function jumps into the middle of
>> another function.
>
> Hmm, right. This is a real problem. I think I have 2 options for this
> issue. I counted the cross-function jumps on my kernel roughly, and
> I found there were about 856 jumps jump into 158 functions (it might be
> incorrect, I just used 'objdump -d', and it also disassembles data
> section...)
Hmm, almost all of these functions are jumped from .fixup section.
Obviously, these should be mentioned.
> - Making a blacklist of target functions or addresses which cross-function
> jumps jump into. This will be done by disassembling kernel when starting up
> kernel and loading modules.(or, at build-time)
If we can make this blacklist, it will include above .fixup section.
>
> - Just disables cross-function optimization by adding --param
> min-crossjump-insns=XXXX where XXXX is enough big number, when
> CONFIG_OPTPROBES=y
BTW, I've tried to compile with min-crossjump-insns=32768. It actually
increased vmlinux size (about 1%),
text data bss dec hex filename
5767574 2022487 1521264 9311325 8e145d vmlinux-crossjump
5809551 2022487 1521264 9353302 8eb856 vmlinux-noncrossjump
However, with crossjumps opt, it seems not to add any jumps which
jump into the middle of other functions...
Thanks,
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division
e-mail: mhiramat@redhat.com
prev parent reply other threads:[~2009-06-17 22:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-12 22:49 [RFC][ PATCH -tip 0/6] kprobes: Kprobes jump optimization support Masami Hiramatsu
2009-06-12 22:49 ` [RFC][ PATCH -tip 1/6] kprobes: use list instead of hlist for insn_pages Masami Hiramatsu
2009-06-12 22:49 ` [RFC][ PATCH -tip 2/6] kprobes: introducing generic insn_slot framework Masami Hiramatsu
2009-06-12 22:49 ` [RFC][ PATCH -tip 3/6] kprobes: kprobes jump optimization core Masami Hiramatsu
2009-06-12 22:49 ` [RFC][ PATCH -tip 4/6] kprobes: x86: cleanup save/restore registers Masami Hiramatsu
2009-06-12 22:49 ` [RFC][ PATCH -tip 5/6] kprobes: x86: support kprobes jump optimization on x86 Masami Hiramatsu
2009-06-12 22:50 ` [RFC][ PATCH -tip 6/6] kprobes: add documents of jump optimization Masami Hiramatsu
2009-06-16 19:50 ` [RFC][ PATCH -tip 0/6] kprobes: Kprobes jump optimization support Tim Abbott
2009-06-16 22:41 ` Masami Hiramatsu
2009-06-17 15:31 ` Masami Hiramatsu
2009-06-17 22:27 ` Masami Hiramatsu [this message]
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=4A396DD6.2050002@redhat.com \
--to=mhiramat@redhat.com \
--cc=ananth@in.ibm.com \
--cc=andersk@ksplice.com \
--cc=dle-develop@lists.sourceforge.net \
--cc=fweisbec@gmail.com \
--cc=hch@infradead.org \
--cc=hpa@zytor.com \
--cc=jkenisto@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=srikar@linux.vnet.ibm.com \
--cc=systemtap@sources.redhat.com \
--cc=tabbott@ksplice.com \
/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