[lttng-dev] [PATCH 07/20] lttng wrappers

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Mon Nov 28 21:22:13 EST 2011


* Greg KH (greg at kroah.com) wrote:
> On Mon, Nov 28, 2011 at 07:42:14AM -0500, Mathieu Desnoyers wrote:
> > Implement wrappers for compatibility with older kernel versions and
> > kernels with had the libringbuffer (old) patchset applied.
> > 
> > Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> 
> Are these going to still be needed anymore, now that this code is in the
> kernel tree?

Hrm, this patch changelog could have been a bit more explicit. In
addition to allow compatibility for older kernel versions, some wrappers
deal with missing EXPORT_SYMBOL_GPL() from the core kernel.

The TODO file details what should be done to eliminate those wrappers:

        2) Cleanup wrappers. The drivers/staging/lttng/wrapper directory
           contains various wrapper headers that use kallsyms lookups to
           work around some missing EXPORT_SYMBOL_GPL() in the mainline
           kernel. Ideally, those few symbols should become exported to
           modules by the kernel.

So hopefully we can look into adding these missing symbols to the core
kernel. This would be much nicer, but this does not depend only on the
lttng driver: it's up to the kernel to export those.

Another option would be to create a CONFIG bool (y/n) object that wraps
the missing core kernel symbols. However, this would require this
support option to be selected at kernel build time in order to allow
loading the lttng modules, and I doubt it's a good practice for a
driver.

As for those wrappers that deal more specifically with compatibility
with older kernels, those aren't needed anymore, of course.

Thoughts ?

Thanks,

Mathieu


-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list