Re: [PATCH 5/9] jump label: Addregister_jump_label_key/unregister_jump_label_key

From: Peter Zijlstra
Date: Fri Oct 15 2010 - 17:03:41 EST


On Fri, 2010-10-15 at 16:09 -0400, Steven Rostedt wrote:
>
> 2)
>
> If a tracepoint is defined in the core kernel code, but the usage
> of the tracepoint is confined to a module, the current jump label
> code does not create a entry in its table until the module is
> loaded. Thus, if the tracepoint is enabled before the module
> is loaded, we would miss the enablement of the jump label.
>
> I'm not sure if there any tracepoints which currently fall into
> this category (the bkl could fall into this category at some point
> if its only used in modules). However, I do think its an important
> case to address to make sure that jump label behave in a consistent
> way with how consumers of the tracepoints might expect.
>
> This case is implemented by introducing:
>
> void register_jump_label_key(unsigned long key);
> void unregister_jump_label_key(unsigned long key);
>
> So basically any jump label that we want to use in the system must
> first be registered, then it can be enabled/disabled, and then
> finally it can be unregistered. For core kernel jump labels, I would
> only expect them to be registered and never unregistered. However,
> a jump label may be unregistred when modules are removed.
>
> Although, this introduces some more work for consumers wanting
> to use jump labels, the tracepoint and dynamic debug consumer code
> seems fairly contained, at least to me.

Urgh, this sucks.. :-(

So now we have to actually track all JUMP_LABEL() sites and call
register muck on them.. even though we already track them through the
special data section.

Is there really no way around this?
--
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/