This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Why systemtap loses events and what can be done about it?
- From: "Frank Ch. Eigler" <fche at redhat dot com>
- To: ååå <zzh at ncic dot ac dot cn>
- Cc: systemtap at sources dot redhat dot com
- Date: Thu, 30 Aug 2007 09:28:46 -0400
- Subject: Re: Why systemtap loses events and what can be done about it?
- References: <E3B350E309394EA0ACB9CCF36729D50F@ncicdcos>
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