[ltt-dev] Kernel crashes when creating a trace

Mathieu Desnoyers mathieu.desnoyers at polymtl.ca
Wed Nov 11 13:22:47 EST 2009


* Ashwin Tanugula (ashwin.tanugula at broadcom.com) wrote:
> Hi Mathieu,
> 
> I have one more question.
> 
> Right now, I only have lttctl compiled as my uClibc (toolchain) does not have splice defined
> 
> I get the undeclared error for SPLICE_F_MOVE and SPLICE_F_MORE
> 
> make[2]: Entering directory `/exp/atanugul/LTTng/2631/ltt-control-0.72-23102009/lttd'
> mipsel-linux-gcc -DHAVE_CONFIG_H -I.. -I..     -g -O2 -MT lttd.o -MD -MP -MF .deps/lttd.Tpo -c -o lttd.o lttd.c
> lttd.c: In function 'read_subbuffer':
> lttd.c:479: error: 'SPLICE_F_MOVE' undeclared (first use in this function)
> lttd.c:479: error: (Each undeclared identifier is reported only once
> lttd.c:479: error: for each function it appears in.)
> lttd.c:479: error: 'SPLICE_F_MORE' undeclared (first use in this function)
> make[2]: *** [lttd.o] Error 1
> make[2]: Leaving directory `/exp/atanugul/LTTng/2631/ltt-control-0.72-23102009/lttd'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/exp/atanugul/LTTng/2631/ltt-control-0.72-23102009'
> make: *** [all] Error 2
> 
> After defining SPLICE_F_MOVE and SPLICE_F_MORE, I get this error
> 
> mipsel-linux-gcc -g -O2 -o lttd lttd.o  -lpthread  
> lttd.o: In function `read_subbuffer':
> /exp/atanugul/LTTng/2631/ltt-control-0.72-23102009/lttd/lttd.c:478: undefined reference to `splice'
> /exp/atanugul/LTTng/2631/ltt-control-0.72-23102009/lttd/lttd.c:485: undefined reference to `splice'
> /exp/atanugul/LTTng/2631/ltt-control-0.72-23102009/lttd/lttd.c:478: undefined reference to `splice'
> collect2: ld returned 1 exit status
> make[2]: *** [lttd] Error 1
> make[2]: Leaving directory `/exp/atanugul/LTTng/2631/ltt-control-0.72-23102009/lttd'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/exp/atanugul/LTTng/2631/ltt-control-0.72-23102009'
> make: *** [all] Error 2
> 
> 
> Is there an easy way to get lttd compiled, without waiting for the uClibc fix?

You might want to try:

#include <sys/syscall.h>
#define splice(...)      syscall(__NR_splice, __VA_ARGS__)

and see if it works. This would let your application use the sys_futex
system call directly. It works on x86, I don't know for mips. Please let
me know how it works out.

> 
> Thanks,
> AShwin
[...]

Thanks,

Mathieu

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68




More information about the lttng-dev mailing list