[lttng-dev] [PATCH lttng-modules] Update kernel probes to more detailed match to kernel versions

Woegerer, Paul Paul_Woegerer at mentor.com
Thu Nov 29 04:11:05 EST 2012


On 11/28/2012 06:16 PM, Gabbasov, Andrew wrote:
>>> The code was verified to compile with latest versions in all stable
>>> branches from 2.6.38.x to 3.6.x and 3.7-rc7.
>>
>> I get this build failure on 3.5 with this patch:
>>
>>   CC [M]  /home/compudj/work/lttng-modules/probes/lttng-probe-ext3.o
>> /home/compudj/work/lttng-modules/probes/lttng-probe-ext3.c:30:29: fatal
>> error: ../fs/ext3/ext3.h: No such file or directory
>> compilation terminated.
>>
>> can you look into it and submit a revised patch ?
> 
> You must be using kernel headers for building lttng-modules (linux-headers package
> or something like that), right? This is what I was writing about: since ext3.h is not available
> in kernel's "include" directory, and in order to avoid duplicating this file in lttng-modules
> sources, we have to use that <../> based reference, and this requires having full kernel
> source for building. The same issue will later be with btrfs and ext4 probes: their necessary
> include files are also not available in kernel headers. 

I agree with Andrew. The problem is that some newer ftrace probes are
written in a way that you have to have the full kernel source tree to
build against them. For the ext3 probe I used a workaround and copied
the included header from fs/ext3/ext3.h to
instrumentation/events/mainline/fs_ext3.h to allow building without the
full kernel source tree. But for the btrfs (and also the ext4) probe
this will not work because they require even more headers that are not
part of the kernel include dir.

--
Paul

-- 
Paul Woegerer | SW Development Engineer
http://go.mentor.com/sourceryanalyzer

Mentor Embedded(tm) | Prinz Eugen Straße 72/2/4, Vienna, 1040 Austria
Nucleus® | Linux® | Android(tm) | Services | UI | Multi-OS

Android is a trademark of Google Inc. Use of this trademark is subject
to Google Permissions.
Linux is the registered trademark of Linus Torvalds in the U.S. and
other countries.



More information about the lttng-dev mailing list