[lkml]   [2006]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Linux Kernel Markers

* Martin J. Bligh <> wrote:

> You know ... it strikes me that there's another way to do this, that's
> zero overhead when not enabled, and gets rid of the inflexibility in
> kprobes. It might not work well in all cases, but at least for simple
> non-inlined functions, it'd seem to.
> Why don't we just copy the whole damned function somewhere else, and
> make an instrumented copy (as a kernel module)? Then reroute all the
> function calls through it, instead of the original version. OK, it's
> not completely trivial to do, but simpler than kprobes (probably doing
> the switchover atomically is the hard part, but not impossible).
> There's NO overhead when not using, and much lower than probes when
> you are.
> That way we can do whatever the hell we please with internal
> variables, however GCC optimises it, can write flexible instrumenting
> code to just about anything, program in C as God intended, etc, etc.
> No, it probably won't fix every case under the sun, but hopefully most
> of them, and we can still use kprobes/djprobes/bodilyprobes for the
> rest of the cases.

yeah, this would be nice - if it werent it for function pointers, and if
all kernel functions were relocatable. But if you can think of a method
to do this, it would be nice.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-09-19 17:43    [W:0.162 / U:3.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site