Re: [PATCH 1/3] jump label: add enabled/disabled state to jumplabel key entries

From: Jason Baron
Date: Wed Nov 24 2010 - 14:18:51 EST


On Wed, Nov 24, 2010 at 10:57:26AM -0500, Steven Rostedt wrote:
> On Wed, 2010-11-24 at 10:21 -0500, Jason Baron wrote:
>
> > The keys are simply the address of a variable or structure (so as to be
> > unique). We can put pointers or anything else in the variable.
>
> Note, there is not a 1 to 1 with keys and places that need to be
> patched.
>
> Doing the following objdump:
>
> objdump -dr vmlinux | grep 'jmpq.*<trace_kmalloc' | wc -l
> 375
>
> That's 375 instances of kmalloc tracepoints[*] and one key. How do you
> handle this?
>

so there is 1 key associated with a kmalloc, call it key 'a'.
Then, each time a trace_kmalloc is found in the text it generates a
entry in the jump label section:

[to be patched address i] [address to jump to j] [key a]
[to be patched address k] [address to jump to l] [key a]
.
.

So when we do jump_label_enable(key a), we patch all addresses
associated with key a. Does this make sense?


> -- Steve
>
>
>
>
> [*] this should be fixed, we probably should find a way to move the
> tracepoint into the kmalloc functions that are not inlined.
>

I believe there are patches pending for this.

thanks,

-Jason
--
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/