This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

problem about compile script use guru mode


i write this script ,but failed in compiling,any one can help?

%{
#include <linux/version.h>
#include <net/sock.h>
#include <net/tcp.h>
#include <net/ip.h>
#include <linux/skbuff.h>
%}

function tcp_ts_get_info_state:long(sock:long)
%{
        struct sock *sk = (struct sock *)(long) THIS->sock;
        THIS->__retvalue = (int64_t) kread(&(sk->sk_state));
        CATCH_DEREF_FAULT();
%}

probe tcp.sendmsg {
printf("%s: TCP: Sending message. state is : %d , Flags %d. Size
%d\n", execname(),tcp_ts_get_info_state($sk), $sk->sk_flags, size)
}

# stap  -v -g ex.stp
Pass 1: parsed user script and 81 library script(s) using
137212virt/22524res/2768shr kb, in 150usr/20sys/175real ms.
Pass 2: analyzed script: 1 probe(s), 4 function(s), 7 embed(s), 0
global(s) using 249068virt/74944res/4460shr kb, in
1010usr/250sys/1267real ms.
Pass 3: translated to C into
"/tmp/stappHyhSV/stap_9a391050596aacbaaabe1cae0d39ca3d_5731_src.c"
using 244692virt/74772res/6444shr kb, in 20usr/0sys/17real ms.
/tmp/stappHyhSV/stap_9a391050596aacbaaabe1cae0d39ca3d_5731_src.c: In
function ‘probe_2001’:
/tmp/stappHyhSV/stap_9a391050596aacbaaabe1cae0d39ca3d_5731_src.c:555:
error: ‘union <anonymous>’ has no member named
‘function_tcp_ts_get_info_state’
/tmp/stappHyhSV/stap_9a391050596aacbaaabe1cae0d39ca3d_5731_src.c:556:
error: implicit declaration of function
‘function_tcp_ts_get_info_state’
/tmp/stappHyhSV/stap_9a391050596aacbaaabe1cae0d39ca3d_5731_src.c:558:
error: ‘union <anonymous>’ has no member named
‘function_tcp_ts_get_info_state’
make[1]: *** [/tmp/stappHyhSV/stap_9a391050596aacbaaabe1cae0d39ca3d_5731_src.o]
Error 1
make: *** [_module_/tmp/stappHyhSV] Error 2
WARNING: make exited with status: 2
Pass 4: compiled C into
"stap_9a391050596aacbaaabe1cae0d39ca3d_5731.ko" in
440usr/130sys/575real ms.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]