signed-off-by: Karim Yaghmour ([email protected])
--- linux-2.6.10-relayfs/net/core/dev.c 2004-12-24 16:34:45.000000000 -0500
+++ linux-2.6.10-relayfs-ltt/net/core/dev.c 2005-01-13 22:21:51.000000000 -0500
@@ -107,6 +107,7 @@
#include <linux/module.h>
#include <linux/kallsyms.h>
#include <linux/netpoll.h>
+#include <linux/ltt-events.h>
#include <linux/rcupdate.h>
#ifdef CONFIG_NET_RADIO
#include <linux/wireless.h> /* Note : will define WIRELESS_EXT */
@@ -1245,6 +1246,8 @@ int dev_queue_xmit(struct sk_buff *skb)
if (skb_checksum_help(skb, 0))
goto out_kfree_skb;
+ ltt_ev_network(LTT_EV_NETWORK_PACKET_OUT, skb->protocol);
+
/* Disable soft irqs for various locks below. Also
* stops preemption for RCU.
*/
@@ -1642,6 +1645,8 @@ int netif_receive_skb(struct sk_buff *sk
__get_cpu_var(netdev_rx_stat).total++;
+ ltt_ev_network(LTT_EV_NETWORK_PACKET_IN, skb->protocol);
+
skb->h.raw = skb->nh.raw = skb->data;
skb->mac_len = skb->nh.raw - skb->mac.raw;
--- linux-2.6.10-relayfs/net/socket.c 2004-12-24 16:34:31.000000000 -0500
+++ linux-2.6.10-relayfs-ltt/net/socket.c 2005-01-13 22:21:51.000000000 -0500
@@ -81,6 +81,7 @@
#include <linux/syscalls.h>
#include <linux/compat.h>
#include <linux/kmod.h>
+#include <linux/ltt-events.h>
#ifdef CONFIG_NET_RADIO
#include <linux/wireless.h> /* Note : will define WIRELESS_EXT */
@@ -551,6 +552,8 @@ int sock_sendmsg(struct socket *sock, st
struct sock_iocb siocb;
int ret;
+ ltt_ev_socket(LTT_EV_SOCKET_SEND, sock->type, size);
+
init_sync_kiocb(&iocb, NULL);
iocb.private = &siocb;
ret = __sock_sendmsg(&iocb, sock, msg, size);
@@ -603,6 +606,8 @@ int sock_recvmsg(struct socket *sock, st
struct sock_iocb siocb;
int ret;
+ ltt_ev_socket(LTT_EV_SOCKET_RECEIVE, sock->type, size);
+
init_sync_kiocb(&iocb, NULL);
iocb.private = &siocb;
ret = __sock_recvmsg(&iocb, sock, msg, size, flags);
@@ -1197,6 +1202,8 @@ asmlinkage long sys_socket(int family, i
if (retval < 0)
goto out_release;
+ ltt_ev_socket(LTT_EV_SOCKET_CREATE, retval, type);
+
out:
/* It may be already another descriptor 8) Not kernel problem. */
return retval;
@@ -1916,6 +1923,8 @@ asmlinkage long sys_socketcall(int call,
a0=a[0];
a1=a[1];
+
+ ltt_ev_socket(LTT_EV_SOCKET_CALL, call, a0);
switch(call)
{