Re: [PATCH] Linux Kernel Markers 0.2 for Linux 2.6.17
From: Frank Ch. Eigler
Date: Wed Sep 20 2006 - 11:55:33 EST
Hi -
Mathieu Desnoyers wrote:
> [...] Do you have ideas on how we can export the function symbol?
> (is it necessary ?)
It turns out that static variables like that get included in the
ordinary symbol tables along with other (un)initialized globals - it
has been making it into /proc/kallsyms. If the normal symbol table is
not available, then some other measure would be needed to find the
variable containing the function pointer.
> [...]
> #define MARK(name, format, args...) \
> do { \
> __mark_check_format(format, ## args); \
> MARK_SYM(name); \
> MARK_CALL(name, format, ## args); \
> } while(0)
While varargs simplify some things, it sacrifices type-safety, in that
a handler function would have to be varargs too. For the systemtap
marker prototype, parametrized variants use scores of (automatically
generated) macros, with different arity/type permutations, each
self-describing and type-safe.
Regarding a marker variant that would require kprobes (inserting a
labelled NOP or few), it may be an appropriate choice where dormant
marker overhead must be minimal and robust parameter passing is less
important.
- FChE
Attachment:
pgp00000.pgp
Description: PGP signature