Re: [PATCH] Linux Kernel Markers 0.2 for Linux 2.6.17

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: pgp2iiNF5vPKS.pgp
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux