[lttng-dev] is ltt patch required to build lttng module?

Jérémie Galarneau jeremie.galarneau at efficios.com
Tue Dec 10 10:20:15 EST 2013


On Tue, Dec 10, 2013 at 6:40 AM, kumar s <skumar.m226 at gmail.com> wrote:
> Hi,
>
> I replaced the makefile with the original makefile. I did not make any
> changes in Makefile now.
>
>
> KERNELDIR=/opt/MIPS/OCTEON-SDK/linux/kernel_2.6/linux  make ARCH=mips
> CROSS_COMPILE=mips64-octeon-linux-gnu-
> make -C  /opt/MIPS/OCTEON-SDK/linux/kernel_2.6/linux
> M=/home/shkumar/lttng-tools/lttngnew/lttng-modules-f49eb38 modules
> make[1]: Entering directory `/opt/MIPS/OCTEON-SDK/linux/kernel_2.6/linux'
>
>   Building modules, stage 2.
>   MODPOST 0 modules
> make[1]: Leaving directory `/opt/MIPS/OCTEON-SDK/linux/kernel_2.6/linux'
>
>
> From  the Readme File ,
>
> I find only CONFIG_MODULES=y, CONFIG_KALLSYMS=y,CONFIG_HIGH_RES_TIMERS=y in
> arch/mips/cavium-octeon_defconfig
>
> I dont find CONFIG_TRACEPOINT in cavium-octeon_defconfig.
>
> Also optional config mentioned in README is not there in
> arch/mips/cavium-octeon_defconfig.(CONFIG_PERF_EVENTS,CONFIG_HAVE_SYSCALL_TRACEPOINTS,CONFIG_EVENT_TRACING,CONFIG_KPROBES).
>
> Is this a reason the lttng modules not getting built?. If so how should i
> set it or enable.?

Probably. It's hard for me to verify since the SDK is behind a
registration/pay wall. CONFIG_TRACEPOINT is a boolean config option so
I guess adding CONFIG_TRACEPOINT=y would do the trick.

Keep in mind that you will have to rebuild your platform's kernel.

Perhaps someone can spot something more obvious?

Jérémie

>
> Thank you
> Skumar
>
>
>
> On Tue, Dec 10, 2013 at 1:01 AM, Jérémie Galarneau
> <jeremie.galarneau at efficios.com> wrote:
>>
>> On Mon, Dec 9, 2013 at 3:13 AM, kumar s <skumar.m226 at gmail.com> wrote:
>> > Hi,
>> >
>> > I have not patched the linux kernel provided with octeon sdk (kernel
>> > version
>> > 2.6.32.27). The Make has been modified with kernel directory path.
>> >
>> > #
>> > # Makefile for the LTT objects.
>> > #
>> >
>> > ifneq ($(KERNELRELEASE),)
>> > ifneq ($(CONFIG_TRACEPOINTS),)
>> >
>> > obj-m += lttng-ring-buffer-client-discard.o
>> > obj-m += lttng-ring-buffer-client-overwrite.o
>> > obj-m += lttng-ring-buffer-metadata-client.o
>> > obj-m += lttng-ring-buffer-client-mmap-discard.o
>> > obj-m += lttng-ring-buffer-client-mmap-overwrite.o
>> > obj-m += lttng-ring-buffer-metadata-mmap-client.o
>> >
>> > obj-m += lttng-tracer.o
>> > lttng-tracer-objs :=  lttng-events.o lttng-abi.o \
>> > lttng-probes.o lttng-context.o \
>> > lttng-context-pid.o lttng-context-procname.o \
>> > lttng-context-prio.o lttng-context-nice.o \
>> > lttng-context-vpid.o lttng-context-tid.o \
>> > lttng-context-vtid.o lttng-context-ppid.o \
>> > lttng-context-vppid.o lttng-calibrate.o \
>> > lttng-context-hostname.o wrapper/random.o
>> >
>> > obj-m += lttng-statedump.o
>> > lttng-statedump-objs := lttng-statedump-impl.o wrapper/irqdesc.o \
>> > wrapper/fdtable.o
>> >
>> > ifneq ($(CONFIG_HAVE_SYSCALL_TRACEPOINTS),)
>> > lttng-tracer-objs += lttng-syscalls.o probes/lttng-probe-user.o
>> > endif # CONFIG_HAVE_SYSCALL_TRACEPOINTS
>> >
>> > ifneq ($(CONFIG_PERF_EVENTS),)
>> > lttng-tracer-objs += $(shell \
>> > if [ $(VERSION) -ge 3 \
>> > -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 33 \) ]
>> > ;
>> > then \
>> > echo "lttng-context-perf-counters.o" ; fi;)
>> > endif # CONFIG_PERF_EVENTS
>> >
>> > obj-m += probes/
>> > obj-m += lib/
>> >
>> > endif # CONFIG_TRACEPOINTS
>> >
>> > else # KERNELRELEASE
>> > KERNELDIR ?=
>> >
>> > /home/shkumar/Development_Merge/OCT_no_patch/OCTEON_SDK/octeon_sdk/OCTEON-SDK/linux/kernel_2.6/linux/
>> > PWD := $(shell pwd)
>> > CFLAGS = $(EXTCFLAGS)
>> >
>> > default:
>> > $(MAKE) -C $(KERNELDIR) M=$(PWD) modules ARCH=mips
>> > CROSS_COMPILE=mips64-octeon-linux-gnu-
>> >
>> > modules_install:
>> > $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
>> >
>> > clean:
>> > $(MAKE) -C $(KERNELDIR) M=$(PWD) clean
>> >
>> > %.i: %.c
>> > $(MAKE) -C $(KERNELDIR) M=$(PWD) $@
>> > endif # KERNELRELEASE
>> >
>> >
>> >
>> > when trying to build
>> >
>> > make -C
>> >
>> > /home/shkumar/Development_Merge/OCT_no_patch/OCTEON_SDK/octeon_sdk/OCTEON-SDK/linux/kernel_2.6/linux/
>> > M=/home/shkumar/lttng-tools/lttngnew/lttng-modules-f49eb38 modules
>> > ARCH=mips
>> > CROSS_COMPILE=mips64-octeon-linux-gnu-
>> > make[1]: Entering directory
>> >
>> > `/home/shkumar/Development_Merge/OCT_no_patch/OCTEON_SDK/octeon_sdk/OCTEON-SDK/linux/kernel_2.6/linux'
>> >   Building modules, stage 2.
>> >   MODPOST 0 modules
>> > make[1]: Leaving directory
>> >
>> > `/home/shkumar/Development_Merge/OCT_no_patch/OCTEON_SDK/octeon_sdk/OCTEON-SDK/linux/kernel_2.6/linux'
>> >
>> > But lttng modules are not compiled. I cannot any modules(.ko or .o)
>> > being
>> > generated in lttng directory or in kernel path.
>> >
>> >
>> > If Octeon sdk is required , it can be obtained from cnusers.org.
>> >
>> > Only patches in linux_patch directory has been applied to the kernel.
>> >
>> > any suggestions to fix this ?
>>
>> Using the -C option should not be necessary.
>>
>> The README in lttng-modules' tree explains how to set a custom kernel
>> directory. The README also details the required kernel configuration
>> options. Make sure that your platform's kernel configuration follows
>> these requirements.
>>
>> % KERNELDIR=path_to_kernel_dir make
>> # KERNELDIR=path_to_kernel_dir make modules_install
>> # depmod -a kernel_version
>>
>> Regards,
>> Jérémie
>>
>> >
>> > Thank you
>> > Skumar
>> >
>> >
>> > On Thu, Dec 5, 2013 at 8:55 PM, Jérémie Galarneau
>> > <jeremie.galarneau at efficios.com> wrote:
>> >>
>> >> On Thu, Dec 5, 2013 at 2:40 AM, kumar s <skumar.m226 at gmail.com> wrote:
>> >> > Hi,
>> >> >
>> >> > I am using kernel version 2.6.32.27. When building lttng module, do i
>> >> > need
>> >> > to build against kernel which is patched using lttng (v0.190) or
>> >> > should
>> >> > i
>> >> > build lttng modules for kernel that is not patched.
>> >> >
>> >>
>> >> You do not need to patch your kernel using the 0.x kernel patch set to
>> >> use the 2.x tracer.
>> >>
>> >> To build lttng-modules on this kernel, you will need to apply the
>> >> patches found under linux-patches in the lttng-modules tree.
>> >>
>> >> Regards,
>> >> Jérémie
>> >>
>> >> > I am trying to build lttng module latest version taken from
>> >> > lttng-module.git
>> >> >
>> >> > Thank you
>> >> > Skumar
>> >> >
>> >> > _______________________________________________
>> >> > lttng-dev mailing list
>> >> > lttng-dev at lists.lttng.org
>> >> > http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Jérémie Galarneau
>> >> EfficiOS Inc.
>> >> http://www.efficios.com
>> >
>> >
>>
>>
>>
>> --
>> Jérémie Galarneau
>> EfficiOS Inc.
>> http://www.efficios.com
>
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list