This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [RFC][ PATCH -tip 0/6] kprobes: Kprobes jump optimization support
- From: Masami Hiramatsu <mhiramat at redhat dot com>
- To: Tim Abbott <tabbott at ksplice dot com>
- Cc: Ingo Molnar <mingo at elte dot hu>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, lkml <linux-kernel at vger dot kernel dot org>, "H. Peter Anvin" <hpa at zytor dot com>, Frederic Weisbecker <fweisbec at gmail dot com>, Jim Keniston <jkenisto at us dot ibm dot com>, Srikar Dronamraju <srikar at linux dot vnet dot ibm dot com>, Christoph Hellwig <hch at infradead dot org>, Steven Rostedt <rostedt at goodmis dot org>, Anders Kaseorg <andersk at ksplice dot com>, systemtap <systemtap at sources dot redhat dot com>, DLE <dle-develop at lists dot sourceforge dot net>
- Date: Wed, 17 Jun 2009 18:27:34 -0400
- Subject: Re: [RFC][ PATCH -tip 0/6] kprobes: Kprobes jump optimization support
- References: <20090612224925.17825.49637.stgit@localhost.localdomain> <alpine.DEB.1.10.0906131031570.29895@vinegar-pot.mit.edu> <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