Re: [PATCH] Kprobes: Add kprobes smoke tests that run on boot

From: Andi Kleen
Date: Tue Jan 08 2008 - 18:26:24 EST


> I have no problem with that, but if we want to make it buildable as a
> module, the call to get_kprobe() needs to be replaced with some other
> gcc-inline-defeating mechanism, or we need to export get_probe(). I

It's still unclear where noinline does not work (do you have details on that?
It sounds a little dubious) but there are lots of different other ways to prevent gcc
from inlining anything.

e.g. you can use stdarg or computed goto or a variable length local array


> much prefer the former, since get_kprobe() is a kprobes-internal
> function.
>
> Anybody know an architecture-independent way (other than noinline, which
> doesn't always work) of making gcc decide not to inline a function?

Details?

> E.g., does taking (and using) the function's address do it?

No, that just creates another out of line copy.

-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/