This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
problem about tapset script
- From: ch huang <justlooks at gmail dot com>
- To: systemtap at sourceware dot org
- Date: Tue, 20 Mar 2012 16:07:22 +0800
- Subject: 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();
%}