problem about tapset script
ch huang
justlooks@gmail.com
Tue Mar 20 08:07:00 GMT 2012
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();
%}
More information about the Systemtap
mailing list