This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH -tip v3 13/23] x86/trap: Use NOKPROBE_SYMBOL macro in trap.c
- From: Andi Kleen <ak at linux dot intel dot com>
- To: Masami Hiramatsu <masami dot hiramatsu dot pt at hitachi dot com>
- Cc: Ingo Molnar <mingo at kernel dot org>, linux-arch at vger dot kernel dot org, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Sandeepa Prabhu <sandeepa dot prabhu at linaro dot org>, Frederic Weisbecker <fweisbec at gmail dot com>, x86 at kernel dot org, lkml <linux-kernel at vger dot kernel dot org>, "Steven Rostedt (Red Hat)" <rostedt at goodmis dot org>, virtualization at lists dot linux-foundation dot org, Ingo Molnar <mingo at redhat dot com>, systemtap at sourceware dot org, "H. Peter Anvin" <hpa at zytor dot com>, Thomas Gleixner <tglx at linutronix dot de>, Seiji Aguchi <seiji dot aguchi at hds dot com>, "David S. Miller" <davem at davemloft dot net>
- Date: Fri, 22 Nov 2013 13:21:19 -0800
- Subject: Re: [PATCH -tip v3 13/23] x86/trap: Use NOKPROBE_SYMBOL macro in trap.c
- Authentication-results: sourceware.org; auth=none
- References: <20131120042148 dot 15296 dot 88360 dot stgit at kbuild-fedora dot novalocal> <20131120042221 dot 15296 dot 85443 dot stgit at kbuild-fedora dot novalocal>
On Wed, Nov 20, 2013 at 04:22:21AM +0000, Masami Hiramatsu wrote:
> Use NOKPROBE_SYMBOL macro to protect functions from kprobes
> instead of __kprobes annotation in trap.c.
> This also applies __always_inline annotation for some cases,
> because NOKPROBE_SYMBOL() will inhibit inlining by referring
> the symbol address.
NOKPROBE_SYMBOL seems to add a reference from some variable to the function?
With LTO we can optimize away unused functions, but not
when there are references to the symbol. So this would likely
prevent optimizations with LTO.
I prefer a simpler "__kprobe" annotation.
-Andi