It is rather easy using ELF segments. You just do macros that put the
names and a pointer to the variable and the type into an ELF segment
starting with a known symbol. Then at kernel/module init you walk this
segment and do the necessary registration.
[has also been done for sysctls]
Disadvantage is that one needs to change modutils for it to make it also
Also it needs new binutils; old binutils tend to mislink code with
the many inter section relocations generated by this technique.
-Andi (who would also like such an easy statistics interface)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/