summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--man/stapprobes.socket.5.in133
-rw-r--r--tapset/ChangeLog4
-rw-r--r--tapset/socket.stp191
-rw-r--r--testsuite/ChangeLog4
-rwxr-xr-xtestsuite/buildok/socket.stp11
6 files changed, 269 insertions, 79 deletions
diff --git a/ChangeLog b/ChangeLog
index 54744ecf..f4757413 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-04-24 Mike Mason <mmlnx@us.ibm.com>
+
+ * man/stapprobes.socket.5.in: Removed do_write and do_read probes,
+ added aio_write, aio_read, writev and readv probes.
+
2007-04-24 David Smith <dsmith@redhat.com>
* tapsets.cxx (common_probe_entryfn_epilogue): Increment
diff --git a/man/stapprobes.socket.5.in b/man/stapprobes.socket.5.in
index 3fa1ae52..6c939fd2 100644
--- a/man/stapprobes.socket.5.in
+++ b/man/stapprobes.socket.5.in
@@ -27,10 +27,11 @@ It contains the following probe points:
Fires at the conclusion of sending a message on a socket.
This probe alias includes the
-.B socket.sendmsg.return
+.B socket.sendmsg.return,
+.B socket.aio_write.return
and
-.B socket.do_write.return
-probes (these two probes should
+.B socket.writev.return
+probes (these probes should
catch all messages sent on sockets). The arguments supplied at the beginning
of the send are cached and made available in this probe.
@@ -127,28 +128,6 @@ The message sender.
6 - DCCP (datagram congestion control protocol socket)
10 - PACKET (Linux-specific way of getting packets at device level)
-.I mflags
- Message type bitmap. Use msg_flags_num2str(flags) to convert
- to a string.
-
- Possible bit settings are:
- 0x01 - OOB
- 0x02 - PEEK
- 0x04 - DONTROUTE
- 0x08 - CTRUNC
- 0x10 - PROBE (Do not send. Only probe path f.e. for MTU)
- 0x20 - TRUNC
- 0x40 - DONTWAIT (Nonblocking IO)
- 0x80 - EOR (End of record)
- 0x100 - WAITALL (Wait for a full request)
- 0x200 - FIN
- 0x400 - SYN
- 0x800 - CONFIRM (Confirm path validity)
- 0x1000 - RST
- 0x2000 - ERRQUEUE (Fetch message from error queue)
- 0x4000 - NOSIGNAL (Do not generate SIGPIPE)
- 0x8000 - MORE (Sender will send more)
-
.I success
Was send successful?
@@ -161,10 +140,11 @@ The message sender.
Fires at the conclusion of receiving a message on a socket.
This probe alias includes the
-.B socket.recvmsg.return
+.B socket.recvmsg.return,
+.B socket.aio_read.return
and
-.B socket.do_read.return
-probes (these two probes should
+.B socket.readv.return
+probes (these probes should
catch all messages received on sockets). The arguments supplied at
the beginning of the receive are cached and made available in this probe.
@@ -251,10 +231,89 @@ The message receiver.
Same as
.B socket.receive.
+
+
+
+
+
+.TP
+.B socket.aio_write
+
+Fires when the sock_aio_write() kernel function is entered.
+
+.B Context:
+
+The message sender.
+
+.B Arguments:
+
+Same as
+.B socket.send,
+with the following exceptions:
+
+.I size
+
+ Size of message being sent (in bytes).
+
+.I success
+
+ Not used.
+
+.TP
+.B socket.aio_write.return
+
+Fires when the sock_aio_write() kernel function returns.
+
+.B Context:
+
+The message sender.
+
+.B Arguments:
+
+Same as
+.B socket.send.
+
+.TP
+.B socket.aio_read
+
+Fires when the sock_aio_read() kernel function is entered.
+
+.B Context:
+
+The message receiver.
+
+.B Arguments:
+
+Same as
+.B socket.receive,
+with the following exceptions:
+
+.I size
+
+ Size of message being received (in bytes).
+
+.I success
+
+ Not used.
+
+.TP
+.B socket.aio_read.return
+
+Fires when the sock_aio_read() kernel function returns.
+
+.B Context:
+
+The message receiver.
+
+.B Arguments:
+
+Same as
+.B socket.receive.
+
.TP
-.B socket.do_write
+.B socket.writev
-Fires when the do_sock_write() kernel function is entered.
+Fires when the sock_writev() kernel function is entered.
.B Context:
@@ -275,9 +334,9 @@ with the following exceptions:
Not used.
.TP
-.B socket.do_write.return
+.B socket.writev.return
-Fires when the do_sock_write() kernel function returns.
+Fires when the sock_writev() kernel function returns.
.B Context:
@@ -289,9 +348,9 @@ Same as
.B socket.send.
.TP
-.B socket.do_read
+.B socket.readv
-Fires when the do_sock_read() kernel function is entered.
+Fires when the sock_readv() kernel function is entered.
.B Context:
@@ -312,9 +371,9 @@ with the following exceptions:
Not used.
.TP
-.B socket.do_read.return
+.B socket.readv.return
-Fires when the do_sock_read() kernel function returns.
+Fires when the sock_readv() kernel function returns.
.B Context:
@@ -423,4 +482,4 @@ The socket closer.
.SH SEE ALSO
.IR stap (1),
.IR stapprobes (5),
-.IR stapfuncs (5) \ No newline at end of file
+.IR stapfuncs (5)
diff --git a/tapset/ChangeLog b/tapset/ChangeLog
index 346fae0f..fcb2e384 100644
--- a/tapset/ChangeLog
+++ b/tapset/ChangeLog
@@ -1,3 +1,7 @@
+2007-04-24 Mike Mason <mmlnx@us.ibm.com>
+
+ * socket.stp: adapted to changes in 2.6.19 socket routines
+
2007-04-24 Will Cohen <wcohen@redhat.com>
* memory.stp: Add matching vm.pagefault.return
diff --git a/tapset/socket.stp b/tapset/socket.stp
index 58732185..aa30f09d 100644
--- a/tapset/socket.stp
+++ b/tapset/socket.stp
@@ -34,11 +34,13 @@
* state Socket state value
* flags Socket flags value
* type Socket type value
- * mflags Message type value
* success Was send successful? (1 = yes, 0 = no)
*/
probe socket.send = socket.sendmsg.return,
- socket.do_write.return
+%( kernel_v < "2.6.19" %?
+ socket.writev.return,
+%)
+ socket.aio_write.return
{
name = "socket.send"
}
@@ -60,11 +62,13 @@ probe socket.send = socket.sendmsg.return,
* state Socket state value
* flags Socket flags value
* type Socket type value
- * mflags Message type value
* success Was send successful? (1 = yes, 0 = no)
*/
probe socket.receive = socket.recvmsg.return,
- socket.do_read.return
+%( kernel_v < "2.6.19" %?
+ socket.readv.return,
+%)
+ socket.aio_read.return
{
name = "socket.receive"
}
@@ -88,7 +92,6 @@ probe socket.receive = socket.recvmsg.return,
* state Socket state value
* flags Socket flags value
* type Socket type value
- * mflags Message type value
*/
probe socket.sendmsg = kernel.function ("sock_sendmsg")
{
@@ -99,7 +102,6 @@ probe socket.sendmsg = kernel.function ("sock_sendmsg")
state = $sock->state
flags = $sock->flags
type = $sock->type
- mflags = $msg->msg_flags
}
/*
@@ -120,7 +122,6 @@ probe socket.sendmsg = kernel.function ("sock_sendmsg")
* state Socket state value
* flags Socket flags value
* type Socket type value
- * mflags Message type value
* success Was send successful? (1 = yes, 0 = no)
*/
probe socket.sendmsg.return = kernel.function ("sock_sendmsg").return
@@ -132,7 +133,6 @@ probe socket.sendmsg.return = kernel.function ("sock_sendmsg").return
state = $sock->state
flags = $sock->flags
type = $sock->type
- mflags = $msg->msg_flags
success = _success_check($return)
}
@@ -153,7 +153,6 @@ probe socket.sendmsg.return = kernel.function ("sock_sendmsg").return
* state Socket state value
* flags Socket flags value
* type Socket type value
- * mflags Message type value
*/
probe socket.recvmsg = kernel.function ("sock_recvmsg")
{
@@ -164,7 +163,6 @@ probe socket.recvmsg = kernel.function ("sock_recvmsg")
state = $sock->state
flags = $sock->flags
type = $sock->type
- mflags = $msg->msg_flags
}
/*
@@ -185,7 +183,6 @@ probe socket.recvmsg = kernel.function ("sock_recvmsg")
* state Socket state value
* flags Socket flags value
* type Socket type value
- * mflags Message type value
* success Was receive successful? (1 = yes, 0 = no)
*/
probe socket.recvmsg.return = kernel.function ("sock_recvmsg").return
@@ -197,15 +194,14 @@ probe socket.recvmsg.return = kernel.function ("sock_recvmsg").return
state = $sock->state
flags = $sock->flags
type = $sock->type
- mflags = $msg->msg_flags
success = _success_check($return)
}
/*
- * probe socket.do_write
+ * probe socket.aio_write
*
* Fires at the beginning of sending a message on a socket
- * via the do_sock_write() function
+ * via the sock_aio_write() function
*
* Context:
* The message sender
@@ -218,11 +214,139 @@ probe socket.recvmsg.return = kernel.function ("sock_recvmsg").return
* state Socket state value
* flags Socket flags value
* type Socket type value
- * mflags Message type value
*/
-probe socket.do_write = kernel.function ("do_sock_write")
+probe socket.aio_write = kernel.function ("sock_aio_write")
{
- name = "socket.do_write"
+ name = "socket.aio_write"
+ _sock = _get_sock_addr ($iocb->ki_filp)
+ size = _get_sock_size ($iov, $nr_segs)
+ protocol = _sock_prot_num (_sock)
+ family = _sock_fam_num (_sock)
+ state = _sock_state_num (_sock)
+ flags = _sock_flags_num (_sock)
+ type = _sock_type_num (_sock)
+}
+
+/*
+ * probe socket.aio_write.return
+ *
+ * Fires at the conclusion of sending a message on a socket
+ * via the sock_aio_write() function
+ *
+ * Context:
+ * The message receiver.
+ *
+ * Variables:
+ * name Name of this probe
+ * size Size of message received (in bytes) or
+ * error code if success = 0
+ * protocol Protocol value
+ * family Protocol family value
+ * state Socket state value
+ * flags Socket flags value
+ * type Socket type value
+ * success Was receive successful? (1 = yes, 0 = no)
+ */
+probe socket.aio_write.return = kernel.function ("sock_aio_write").return
+{
+ name = "socket.aio_write.return"
+ size = $return
+ _sock = _get_sock_addr ($iocb->ki_filp)
+ size = _get_sock_size ($iov, $nr_segs)
+ protocol = _sock_prot_num (_sock)
+ family = _sock_fam_num (_sock)
+ state = _sock_state_num (_sock)
+ flags = _sock_flags_num (_sock)
+ type = _sock_type_num (_sock)
+ success = _success_check($return)
+}
+
+/*
+ * probe socket.aio_read
+ *
+ * Fires at the beginning of receiving a message on a socket
+ * via the sock_aio_read() function
+ *
+ * Context:
+ * The message sender
+ *
+ * Variables:
+ * name Name of this probe
+ * size Message size in bytes
+ * protocol Protocol value
+ * family Protocol family value
+ * state Socket state value
+ * flags Socket flags value
+ * type Socket type value
+ */
+probe socket.aio_read = kernel.function ("sock_aio_read")
+{
+ name = "socket.aio_read"
+ _sock = _get_sock_addr ($iocb->ki_filp)
+ size = _get_sock_size ($iov, $nr_segs)
+ protocol = _sock_prot_num (_sock)
+ family = _sock_fam_num (_sock)
+ state = _sock_state_num (_sock)
+ flags = _sock_flags_num (_sock)
+ type = _sock_type_num (_sock)
+}
+
+/*
+ * probe socket.aio_read.return
+ *
+ * Fires at the conclusion of receiving a message on a socket
+ * via the sock_aio_read() function
+ *
+ * Context:
+ * The message receiver.
+ *
+ * Variables:
+ * name Name of this probe
+ * size Size of message received (in bytes) or
+ * error code if success = 0
+ * protocol Protocol value
+ * family Protocol family value
+ * state Socket state value
+ * flags Socket flags value
+ * type Socket type value
+ * success Was receive successful? (1 = yes, 0 = no)
+ */
+probe socket.aio_read.return = kernel.function ("sock_aio_read").return
+{
+ name = "socket.aio_read.return"
+ size = $return
+ _sock = _get_sock_addr ($iocb->ki_filp)
+ protocol = _sock_prot_num (_sock)
+ family = _sock_fam_num (_sock)
+ state = _sock_state_num (_sock)
+ flags = _sock_flags_num (_sock)
+ type = _sock_type_num (_sock)
+ success = _success_check($return)
+}
+
+// readv and writev were removed in 2.6.19
+%( kernel_v < "2.6.19" %?
+/*
+ * probe socket.writev
+ *
+ * Fires at the beginning of sending a message on a socket
+ * via the sock_writev() function
+ *
+ * Context:
+ * The message sender
+ *
+ * Variables:
+ * name Name of this probe
+ * size Message size in bytes
+ * protocol Protocol value
+ * family Protocol family value
+ * state Socket state value
+ * flags Socket flags value
+ * type Socket type value
+ */
+probe socket.writev = kernel.function ("sock_writev")
+{
+ name = "socket.writev"
_sock = _get_sock_addr ($file)
size = _get_sock_size ($iov, $nr_segs)
protocol = _sock_prot_num (_sock)
@@ -230,14 +354,13 @@ probe socket.do_write = kernel.function ("do_sock_write")
state = _sock_state_num (_sock)
flags = _sock_flags_num (_sock)
type = _sock_type_num (_sock)
- mflags = $msg->msg_flags
}
/*
- * probe socket.do_write.return
+ * probe socket.writev.return
*
* Fires at the conclusion of sending a message on a socket
- * via the do_sock_write() function
+ * via the sock_writev() function
*
* Context:
* The message receiver.
@@ -251,12 +374,11 @@ probe socket.do_write = kernel.function ("do_sock_write")
* state Socket state value
* flags Socket flags value
* type Socket type value
- * mflags Message type value
* success Was send successful? (1 = yes, 0 = no)
*/
-probe socket.do_write.return = kernel.function ("do_sock_write").return
+probe socket.writev.return = kernel.function ("sock_writev").return
{
- name = "socket.do_write.return"
+ name = "socket.writev.return"
size = $return
_sock = _get_sock_addr ($file)
protocol = _sock_prot_num (_sock)
@@ -264,15 +386,14 @@ probe socket.do_write.return = kernel.function ("do_sock_write").return
state = _sock_state_num (_sock)
flags = _sock_flags_num (_sock)
type = _sock_type_num (_sock)
- mflags = $msg->msg_flags
success = _success_check($return)
}
/*
- * probe socket.do_read
+ * probe socket.readv
*
* Fires at the beginning of receiving a message on a socket
- * via the do_sock_read() function
+ * via the sock_readv() function
*
* Context:
* The message sender
@@ -285,11 +406,10 @@ probe socket.do_write.return = kernel.function ("do_sock_write").return
* state Socket state value
* flags Socket flags value
* type Socket type value
- * mflags Message type value
*/
-probe socket.do_read = kernel.function ("do_sock_read")
+probe socket.readv = kernel.function ("sock_readv")
{
- name = "socket.do_read"
+ name = "socket.readv"
_sock = _get_sock_addr ($file)
size = _get_sock_size ($iov, $nr_segs)
protocol = _sock_prot_num (_sock)
@@ -297,14 +417,13 @@ probe socket.do_read = kernel.function ("do_sock_read")
state = _sock_state_num (_sock)
flags = _sock_flags_num (_sock)
type = _sock_type_num (_sock)
- mflags = $msg->msg_flags
}
/*
- * probe socket.do_read.return
+ * probe socket.readv.return
*
* Fires at the conclusion of receiving a message on a socket
- * via the do_sock_read() function
+ * via the sock_readv() function
*
* Context:
* The message receiver.
@@ -318,12 +437,11 @@ probe socket.do_read = kernel.function ("do_sock_read")
* state Socket state value
* flags Socket flags value
* type Socket type value
- * mflags Message type value
* success Was receive successful? (1 = yes, 0 = no)
*/
-probe socket.do_read.return = kernel.function ("do_sock_read").return
+probe socket.readv.return = kernel.function ("sock_readv").return
{
- name = "socket.do_read.return"
+ name = "socket.readv.return"
size = $return
_sock = _get_sock_addr ($file)
protocol = _sock_prot_num (_sock)
@@ -331,9 +449,9 @@ probe socket.do_read.return = kernel.function ("do_sock_read").return
state = _sock_state_num (_sock)
flags = _sock_flags_num (_sock)
type = _sock_type_num (_sock)
- mflags = $msg->msg_flags
success = _success_check($return)
}
+%)
/*
* probe socket.create
@@ -560,7 +678,6 @@ function msg_flags_num2str:string (flags:long)
strlcpy (THIS->__retvalue, str, MAXSTRINGLEN);
%}
-
###########################
# INTERNAL MAPPING ARRAYS #
###########################
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index 9216640e..21c78ba1 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2007-0-2 Mike Mason <mmlnx@us.ibm.com>
+
+ * buildok/socket.stp: Adapted to changes in 2.6.19 socket routines.
+
2007-04-24 Will Cohen <wcohen@redhat.com>
* buildok/memory.stp: Test vm.pagefault.return.
diff --git a/testsuite/buildok/socket.stp b/testsuite/buildok/socket.stp
index cac6f714..4b9142a9 100755
--- a/testsuite/buildok/socket.stp
+++ b/testsuite/buildok/socket.stp
@@ -3,8 +3,12 @@
probe socket.send, socket.receive,
socket.sendmsg, socket.sendmsg.return,
socket.recvmsg, socket.recvmsg.return,
- socket.do_write, socket.do_write.return,
- socket.do_read, socket.do_read.return
+%( kernel_v < "2.6.19" %?
+ socket.writev, socket.writev.return,
+ socket.readv, socket.readv.return,
+%)
+ socket.aio_write, socket.aio_write.return,
+ socket.aio_read, socket.aio_read.return
{
log(pp())
log(name)
@@ -29,9 +33,6 @@ probe socket.send, socket.receive,
typ = sock_type_str2num(tstr)
log(sprintf("%d, %d, %s", type, typ, tstr))
- mflstr = msg_flags_num2str(mflags)
- log(sprintf("%d, %s", mflags, mflstr))
-
log(sprintf("%d", success))
}