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]

Re: Why systemtap loses events and what can be done about it?


Hi -

<zzh@ncic.ac.cn> wrote:

> Hi, I wrote a systemtap script to trace the tcp.send_msg and
> tcp_recv_msg event.  It works well in most time, but loses events
> when many events come concurrently.

By losing events, you mean that you saw warning messages about skipped
probes?  Or are the messages about lost messages in the trace buffer?
If the latter, you could increase the size of the trace buffer (-s
option), or even try the per-cpu (-b option) mode.


> /* get remote end-point and local end-point*/
> function get_sock_addr:string (sock:long)
> %{
>     struct inet_sock *sk = inet_sk((struct sock*)(long) THIS->sock );
>     sprintf( THIS->__retvalue, "%u:%u-%u:%u",sk->saddr,ntohs(sk->sport)
> , sk->daddr, ntohs(sk->dport)) ; 
> %}

This uses unprotected pointer dereferences rather than the protected
kread() function.  (This kind of function belongs in the networking
tapset, by the way.)


- FChE


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