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 tapset script


i read tcp.stp script and see the following code ,this is Embedded C
code ,i do not know why each function has THIS->xxx and
CATCH_DEREF_FAULT()
and i can not find the explain in systemtap language reference
document ,any one can help?


%{ /* pure */
        struct sock *sk = (struct sock *)(long) THIS->sock;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
        struct tcp_opt *tp = tcp_sk(sk);
        THIS->__retvalue = (int64_t) jiffies_to_usecs(kread(&(tp->rto)));
#else
        const struct inet_connection_sock *icsk = inet_csk(sk);
        THIS->__retvalue = (int64_t) jiffies_to_usecs(kread(&(icsk->icsk_rto)));
#endif
        CATCH_DEREF_FAULT();
%}


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