From e0c4dae873d0c7365f928fa2e72450f33b69ca3d Mon Sep 17 00:00:00 2001 From: William Cohen Date: Tue, 25 Nov 2008 17:53:16 -0500 Subject: [PATCH] Add ioscheduler, socket, tcp, and upd to tapset reference. --- doc/ChangeLog | 5 + doc/SystemTap_Tapset_Reference/tapsets.tmpl | 37 ++ tapset/ChangeLog | 7 + tapset/ioscheduler.stp | 29 +- tapset/socket.stp | 432 +++++++++----------- tapset/tcp.stp | 167 ++++---- tapset/udp.stp | 119 +++--- 7 files changed, 393 insertions(+), 403 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 41060910b..81c3f63e6 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2008-11-25 Will Cohen + + * SystemTap_Tapset_Reference/tapsets.tmpl: Add ioscheduler, socket, tcp, + and upd. + 2008-11-24 Will Cohen * SystemTap_Tapset_Reference/tapsets.tmpl: Add context, timestamp, diff --git a/doc/SystemTap_Tapset_Reference/tapsets.tmpl b/doc/SystemTap_Tapset_Reference/tapsets.tmpl index ccdba8c25..cf12e2e1b 100644 --- a/doc/SystemTap_Tapset_Reference/tapsets.tmpl +++ b/doc/SystemTap_Tapset_Reference/tapsets.tmpl @@ -141,6 +141,16 @@ This is common among !Itapset/memory.stp + + IO Scheduler Tapset + + This family of probe points is used to probe the IO scheduler activities. + It contains the following probe points: + +!Itapset/ioscheduler.stp + + + Networking Tapset @@ -150,4 +160,31 @@ This is common among !Itapset/networking.stp + + Socket Tapset + + This family of probe points is used to probe socket activities. + It contains the following probe points: + +!Itapset/socket.stp + + + + TCP Tapset + + This family of probe points is used to probe TCP layer activities. + It contains the following probe points: + +!Itapset/tcp.stp + + + + UDP Tapset + + This family of probe points is used to probe UDP layer activities. + It contains the following probe points: + +!Itapset/udp.stp + + diff --git a/tapset/ChangeLog b/tapset/ChangeLog index 20b564ca8..63b035e41 100644 --- a/tapset/ChangeLog +++ b/tapset/ChangeLog @@ -1,3 +1,10 @@ +2008-11-25 Will Cohen + + * ioscheduler.stp: + * socket.stp: + * tcp.stp: + * udp.stp: Add kernel-doc notation. + 2008-11-24 Will Cohen * context.stp: diff --git a/tapset/ioscheduler.stp b/tapset/ioscheduler.stp index 017bcc274..d7a71aca2 100644 --- a/tapset/ioscheduler.stp +++ b/tapset/ioscheduler.stp @@ -11,7 +11,10 @@ #include %} -/* when a request is retrieved from request queue */ +/** + * probe ioscheduler.elv_next_request - Retrieve request from request queue + * @elevator_name: The elevator name + */ probe ioscheduler.elv_next_request = kernel.function("elv_next_request") { @@ -22,6 +25,13 @@ probe ioscheduler.elv_next_request %) } +/** + * probe ioscheduler.elv_next_request.return - Return from retrieving a request + * @req: Address of the request + * @req_flags: Request flags + * @disk_major: Disk major number of the request + * @disk_minor: Disk minor number of the request + */ probe ioscheduler.elv_next_request.return = kernel.function("elv_next_request").return { @@ -47,6 +57,14 @@ probe ioscheduler.elv_next_request.return } } +/** + * probe ioscheduler.elv_add_request - Add a request into request queue + * @elevator_name: The elevator name + * @req: Address of the request + * @req_flags: Request flags + * @disk_major: Disk major number of the request + * @disk_minor: Disk minor number of the request + */ /* when a request is added to the request queue */ probe ioscheduler.elv_add_request = kernel.function("__elv_add_request") @@ -77,7 +95,14 @@ probe ioscheduler.elv_add_request %) } -/* when a request is completed */ +/** + * probe ioscheduler.elv_completed_request - Request is completed + * @elevator_name: The elevator name + * @req: Address of the request + * @req_flags: Request flags + * @disk_major: Disk major number of the request + * @disk_minor: Disk minor number of the request + */ probe ioscheduler.elv_completed_request = kernel.function("elv_completed_request") { diff --git a/tapset/socket.stp b/tapset/socket.stp index 5c521a334..842dbfc40 100644 --- a/tapset/socket.stp +++ b/tapset/socket.stp @@ -17,24 +17,19 @@ ### GENERAL SEND/RECEIVE PROBES ### -/* - * probe socket.send - * - * Fires when a message is sent on a socket. +/** + * probe socket.send - Message sent on a socket. + * @name: Name of this probe + * @size: Size of message sent (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 send successful? (1 = yes, 0 = no) * * Context: * The message sender - * - * Variables: - * name Name of this probe - * size Size of message sent (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 send successful? (1 = yes, 0 = no) */ probe socket.send = socket.sendmsg.return, %( kernel_v < "2.6.19" %? @@ -45,24 +40,19 @@ probe socket.send = socket.sendmsg.return, name = "socket.send" } -/* - * probe socket.receive - * - * Fires when a message is received on a socket. +/** + * probe socket.receive - Message received on a socket. + * @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 send successful? (1 = yes, 0 = no) * * 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 send successful? (1 = yes, 0 = no) */ probe socket.receive = socket.recvmsg.return, %( kernel_v < "2.6.19" %? @@ -76,22 +66,20 @@ probe socket.receive = socket.recvmsg.return, ### FUNCTION SPECIFIC SEND/RECEIVE PROBES ### /* - * probe socket.sendmsg - * - * Fires at the beginning of sending a message on a socket - * via the the sock_sendmsg() function + * probe socket.sendmsg - Message being sent on socket + * @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 * * 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 + * Fires at the beginning of sending a message on a socket + * via the the sock_sendmsg() function */ probe socket.sendmsg = kernel.function ("sock_sendmsg") { @@ -104,25 +92,22 @@ probe socket.sendmsg = kernel.function ("sock_sendmsg") type = $sock->type } -/* - * probe socket.sendmsg.return - * - * Fires at the conclusion of sending a message on a socket - * via the sock_sendmsg() function +/** + * probe socket.sendmsg.return - Return from Message being sent on socket + * @name: Name of this probe + * @size: Size of message sent (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 send successful? (1 = yes, 0 = no) * * Context: * The message sender. * - * Variables: - * name Name of this probe - * size Size of message sent (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 send successful? (1 = yes, 0 = no) + * Fires at the conclusion of sending a message on a socket + * via the sock_sendmsg() function */ probe socket.sendmsg.return = kernel.function ("sock_sendmsg").return { @@ -136,23 +121,22 @@ probe socket.sendmsg.return = kernel.function ("sock_sendmsg").return success = _success_check($return) } -/* - * probe socket.recvmsg - * - * Fires at the beginning of receiving a message on a socket - * via the sock_recvmsg() function +/** + * probe socket.recvmsg - Message being received on socket + * @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 * * Context: * The message receiver. * - * 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 + * Fires at the beginning of receiving a message on a socket + * via the sock_recvmsg() function + * */ probe socket.recvmsg = kernel.function ("sock_recvmsg") { @@ -166,24 +150,23 @@ probe socket.recvmsg = kernel.function ("sock_recvmsg") } /* - * probe socket.recvmsg.return + * probe socket.recvmsg.return - Return from Message being received on socket + * @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) + * + * Context: + * The message receiver. * * Fires at the conclusion of receiving a message on a socket * via the sock_recvmsg() 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.recvmsg.return = kernel.function ("sock_recvmsg").return { @@ -197,24 +180,23 @@ probe socket.recvmsg.return = kernel.function ("sock_recvmsg").return success = _success_check($return) } -/* - * probe socket.aio_write - * - * Fires at the beginning of sending a message on a socket - * via the sock_aio_write() function +/** + * probe socket.aio_write - Message send via sock_aio_write() + * @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 * * 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 - * + * Fires at the beginning of sending a message on a socket + * via the sock_aio_write() function + */ +/* * 2.6.9~2.6.15: * static ssize_t sock_aio_write(struct kiocb *iocb, const char __user *ubuf, size_t size, loff_t pos); * 2.6.16~2.6.18: @@ -242,25 +224,22 @@ probe socket.aio_write = kernel.function ("sock_aio_write") 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 +/** + * probe socket.aio_write.return - Conclusion of message send via sock_aio_write() + * @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) * * 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) + * + * Fires at the conclusion of sending a message on a socket + * via the sock_aio_write() function */ probe socket.aio_write.return = kernel.function ("sock_aio_write").return { @@ -275,24 +254,23 @@ probe socket.aio_write.return = kernel.function ("sock_aio_write").return 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 +/** + * probe socket.aio_read - Receiving message via sock_aio_read() + * @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 * * 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 - * + * Fires at the beginning of receiving a message on a socket + * via the sock_aio_read() function + */ +/* * 2.6.9~2.6.15: * static ssize_t sock_aio_read(struct kiocb *iocb, char __user *ubuf, size_t size, loff_t pos); * 2.6.16~2.6.18: @@ -320,25 +298,22 @@ probe socket.aio_read = kernel.function ("sock_aio_read") 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 +/** + * probe socket.aio_read.return - Conclusion of message received via sock_aio_read() + * @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) * * 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) + * + * Fires at the conclusion of receiving a message on a socket + * via the sock_aio_read() function */ probe socket.aio_read.return = kernel.function ("sock_aio_read").return { @@ -355,23 +330,21 @@ probe socket.aio_read.return = kernel.function ("sock_aio_read").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 +/** + * probe socket.writev - Message sent via socket_writev() + * @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 * * 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 + * Fires at the beginning of sending a message on a socket + * via the sock_writev() function */ probe socket.writev = kernel.function ("sock_writev") { @@ -385,25 +358,22 @@ probe socket.writev = kernel.function ("sock_writev") type = _sock_type_num (_sock) } -/* - * probe socket.writev.return - * - * Fires at the conclusion of sending a message on a socket - * via the sock_writev() function +/** + * probe socket.writev.return - Conclusion of message sent via socket_writev() + * @name: Name of this probe + * @size: Size of message sent (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 send successful? (1 = yes, 0 = no) * * Context: * The message receiver. * - * Variables: - * name Name of this probe - * size Size of message sent (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 send successful? (1 = yes, 0 = no) + * Fires at the conclusion of sending a message on a socket + * via the sock_writev() function */ probe socket.writev.return = kernel.function ("sock_writev").return { @@ -418,23 +388,21 @@ probe socket.writev.return = kernel.function ("sock_writev").return success = _success_check($return) } -/* - * probe socket.readv - * - * Fires at the beginning of receiving a message on a socket - * via the sock_readv() function +/** + * probe socket.readv - Receiving a message via sock_readv() + * @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 * * 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 + * Fires at the beginning of receiving a message on a socket + * via the sock_readv() function */ probe socket.readv = kernel.function ("sock_readv") { @@ -448,25 +416,22 @@ probe socket.readv = kernel.function ("sock_readv") type = _sock_type_num (_sock) } -/* - * probe socket.readv.return - * - * Fires at the conclusion of receiving a message on a socket - * via the sock_readv() function +/** + * probe socket.readv.return - Conclusion of receiving a message via sock_readv() + * @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) * * 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) + * Fires at the conclusion of receiving a message on a socket + * via the sock_readv() function */ probe socket.readv.return = kernel.function ("sock_readv").return { @@ -482,20 +447,18 @@ probe socket.readv.return = kernel.function ("sock_readv").return } %) -/* - * probe socket.create - * - * Fires at the beginning of creating a socket. +/** + * probe socket.create - Creation of a socket + * @name: Name of this probe + * @protocol: Protocol value + * @family: Protocol family value + * @type: Socket type value + * @requester: Requested by user process or the kernel (1 = kernel, 0 = user) * * Context: * The requester (see requester variable) * - * Variables: - * name Name of this probe - * protocol Protocol value - * family Protocol family value - * type Socket type value - * requester Requested by user process or the kernel (1 = kernel, 0 = user) + * Fires at the beginning of creating a socket. */ probe socket.create = kernel.function("__sock_create") { @@ -506,22 +469,20 @@ probe socket.create = kernel.function("__sock_create") requester =$kern } -/* - * probe socket.create.return - * - * Fires at the conclusion of creating a socket. +/** + * probe socket.create.return - Return from Creation of a socket + * @name: Name of this probe + * @protocol: Protocol value + * @family: Protocol family value + * @type: Socket type value + * @requester: Requested by user process or the kernel (1 = kernel, 0 = user) + * @err: Error code if success == 0 + * @success: Was socket creation successful? (1 = yes, 0 = no) * * Context: * The requester (user process or kernel) * - * Variables: - * name Name of this probe - * protocol Protocol value - * family Protocol family value - * type Socket type value - * requester Requested by user process or the kernel (1 = kernel, 0 = user) - * err Error code if success == 0 - * success Was socket creation successful? (1 = yes, 0 = no) + * Fires at the conclusion of creating a socket. */ probe socket.create.return = kernel.function("__sock_create").return { @@ -534,21 +495,19 @@ probe socket.create.return = kernel.function("__sock_create").return success = _success_check($return) } -/* - * probe socket.close - * - * Fires at the beginning of closing a socket. +/** + * probe socket.close - Close a socket + * @name: Name of this probe + * @protocol: Protocol value + * @family: Protocol family value + * @state: Socket state value + * @flags: Socket flags value + * @type: Socket type value * * Context: * The requester (user process or kernel) * - * Variables: - * name Name of this probe - * protocol Protocol value - * family Protocol family value - * state Socket state value - * flags Socket flags value - * type Socket type value + * Fires at the beginning of closing a socket. */ probe socket.close = kernel.function ("sock_release") { @@ -560,13 +519,14 @@ probe socket.close = kernel.function ("sock_release") type = $sock->type } -/* - * probe socket.close.return - * - * Fires at the conclusion of closing a socket. +/** + * probe socket.close.return - Return from closing a socket + * @name: Name of this probe * * Context: * The requester (user process or kernel) + * + * Fires at the conclusion of closing a socket. */ probe socket.close.return = kernel.function ("sock_release").return { diff --git a/tapset/tcp.stp b/tapset/tcp.stp index 7fa48000b..995d6abc7 100644 --- a/tapset/tcp.stp +++ b/tapset/tcp.stp @@ -143,18 +143,15 @@ function tcp_sockopt_str:string (optname:long) { return (optname in sockopt ? sockopt[optname] : "UNDEF") } -// probe tcp.sendmsg -// -// Fires whenever sending a tcp message -// -// Context: -// The process which sends a tcp message -// -// Arguments: -// name - name of this probe -// sock - network socket -// size - number of bytes to send -// +/** + * probe tcp.sendmsg - Sending a tcp message + * @name: Name of this probe + * @sock: Network socket + * @size: Number of bytes to send + * + * Context: + * The process which sends a tcp message + */ probe tcp.sendmsg = kernel.function("tcp_sendmsg") { name = "tcp.sendmsg" %( kernel_v < "2.6.23" %? @@ -165,107 +162,86 @@ probe tcp.sendmsg = kernel.function("tcp_sendmsg") { size = $size } -// probe tcp.sendmsg.return -// -// Fires whenever sending message is done -// -// Context: -// The process which sends a tcp message -// -// Arguments: -// name - name of this probe -// size - number of bytes sent or -// error code if an error occurred. -// +/** + * probe tcp.sendmsg.return - Sending TCP message is done + * @name: Name of this probe + * @size: Number of bytes sent or error code if an error occurred. + * + * Context: + * The process which sends a tcp message + */ probe tcp.sendmsg.return = kernel.function("tcp_sendmsg").return { name = "tcp.sendmsg" size = $return } -// probe tcp.recvmsg -// -// Fires whenever a message is received -// -// Context: -// The process which receives a tcp message -// -// Arguments: -// name - name of this probe -// sock - network socket -// size - number of bytes to be received -// +/** + * probe tcp.recvmsg - Receiving TCP message + * @name: Name of this probe + * @sock: Network socket + * @size: Number of bytes to be received + * Context: + * The process which receives a tcp message + */ probe tcp.recvmsg = kernel.function("tcp_recvmsg") { name = "tcp.recvmsg" sock = $sk size = $len } -// probe tcp.recvmsg.return -// -// Fires whenever message receiving is done -// -// Context: -// The process which receives a tcp message -// -// Arguments: -// name - name of this probe -// size - number of bytes received or -// error code if an error occurred. -// +/** + * probe tcp.recvmsg.return - Receiving TCP message complete + * @name: Name of this probe + * @size: Number of bytes received or error code if an error occurred. + * + * Context: + * The process which receives a tcp message + */ probe tcp.recvmsg.return = kernel.function("tcp_recvmsg").return { name = "tcp.recvmsg" size = $return } -// probe tcp.disconnect -// -// Fires whenever tcp is disconnected -// -// Context: -// The process which disconnects tcp -// -// Arguments: -// name - name of this probe -// sock - network socket -// flags - TCP flags (e.g. FIN, etc) -// +/** + * probe tcp.disconnect - TCP socket disconnection + * @name: Name of this probe + * @sock: Network socket + * @flags: TCP flags (e.g. FIN, etc) + * + * Context: + * The process which disconnects tcp + */ probe tcp.disconnect = kernel.function("tcp_disconnect") { name = "tcp.disconnect" sock = $sk flags = $flags } -// probe tcp.disconnect.return -// -// Fires when returning from tcp.disconnect -// -// Context: -// The process which disconnects tcp -// -// Arguments: -// name - name of this probe -// ret - error code (0: no error) -// +/** + * probe tcp.disconnect.return - TCP socket disconnection complete + * @name: Name of this probe + * @ret: Error code (0: no error) + * + * Context: + * The process which disconnects tcp + */ probe tcp.disconnect.return = kernel.function("tcp_disconnect").return { name = "tcp.disconnect" ret = $return } -// probe tcp.setsockopt -// -// Fires whenever setsockopt(s, IPPROTO_TCP, TCP_*, ...) is called -// -// Context: -// The process which calls setsockopt -// -// Arguments: -// name - name of this probe -// sock - network socket -// level - the level at which the socket options will be manipulated -// optname - TCP socket options (e.g. TCP_NODELAY, TCP_MAXSEG, etc) -// optstr - resolves optname to a human-readable format -// optlen - used to access values for setsockopt() -// +/** + * probe tcp.setsockopt - Call to setsockopt() + * @name: Name of this probe + * @sock: Network socket + * @level: The level at which the socket options will be manipulated + * @optname: TCP socket options (e.g. TCP_NODELAY, TCP_MAXSEG, etc) + * @optstr: Resolves optname to a human-readable format + * @optlen: Used to access values for setsockopt() + * + * Context: + * The process which calls setsockopt + */ probe tcp.setsockopt = kernel.function("tcp_setsockopt") { name = "tcp.setsockopt" sock = $sk @@ -275,17 +251,14 @@ probe tcp.setsockopt = kernel.function("tcp_setsockopt") { optlen = $optlen } -// probe tcp.setsockopt.return -// -// Fires whenever setsockopt(s, IPPROTO_TCP, TCP_*, ...) is done -// -// Context: -// The process which calls setsockopt -// -// Arguments: -// name - name of this probe -// ret - error code (0: no error) -// +/** + * probe tcp.setsockopt.return - Return from setsockopt() + * @name: Name of this probe + * @ret: Error code (0: no error) + * + * Context: + * The process which calls setsockopt + */ probe tcp.setsockopt.return = kernel.function("tcp_setsockopt").return { name = "tcp.setsockopt" ret = $return diff --git a/tapset/udp.stp b/tapset/udp.stp index 1559058b7..984df6925 100644 --- a/tapset/udp.stp +++ b/tapset/udp.stp @@ -13,102 +13,85 @@ #include %} -// probe udp.sendmsg -// -// Fires whenever sending a udp message -// -// Context: -// The process which sends a udp message -// -// Arguments: -// name - name of this probe -// sock - network socket -// size - number of bytes to send +/** + * probe udp.sendmsg - Sending a UDP message + * @name: Name of this probe + * @sock: Network socket + * @size: Number of bytes to send + * + * Context: + * The process which sends a udp message + */ probe udp.sendmsg = kernel.function("udp_sendmsg") { name = "udp.sendmsg" sock = $sk size = $len } -// probe udp.sendmsg.return -// -// Fires whenever sending message is done -// -// Context: -// The process which sends a udp message -// -// Arguments: -// name - name of this probe -// size - number of bytes sent -// +/** + * probe udp.sendmsg.return - Sending UDP message complete + * @name: Name of this probe + * @size: Number of bytes sent + * + * Context: + * The process which sends a udp message + */ probe udp.sendmsg.return = kernel.function("udp_sendmsg").return { name = "udp.sendmsg" size = $return } -// probe udp.recvmsg -// -// Fires whenever a message is received -// -// Context: -// The process which receives a udp message -// -// Arguments: -// name - name of this probe -// sock - network socket -// size - number of bytes to be received -// +/** + * probe udp.recvmsg - UDP message received + * @name: Name of this probe + * @sock: Network socket + * @size: Number of bytes to be received + * + * Context: + * The process which receives a udp message + */ probe udp.recvmsg = kernel.function("udp_recvmsg") { name = "udp.recvmsg" sock = $sk size = $len } -// probe udp.recvmsg.return -// -// Fires whenever message receiving is done -// -// Context: -// The process which receives a udp message -// -// Arguments: -// name - name of this probe -// size - number of bytes received -// +/** + * probe udp.recvmsg.return - UDP message received is complete + * @name: Name of this probe + * @size: Number of bytes received + * + * Context: + * The process which receives a udp message + */ probe udp.recvmsg.return = kernel.function("udp_recvmsg").return { name = "udp.recvmsg" size = $return } -// probe udp.disconnect -// -// Fires whenever udp is disconnected -// -// Context: -// The process which disconnects udp -// -// Arguments: -// name - name of this probe -// sock - network socket -// flags - flags (e.g. FIN, etc) -// +/** + * probe udp.disconnect - UDP is disconnected + * @name: Name of this probe + * @sock: Network socket + * @flags: Flags (e.g. FIN, etc) + * + * Context: + * The process which disconnects udp + */ probe udp.disconnect = kernel.function("udp_disconnect") { name = "udp.disconnect" sock = $sk flags = $flags } -// probe udp.disconnect.return -// -// Fires when returning from udp.disconnect -// -// Context: -// The process which disconnects udp -// -// Arguments: -// name - name of this probe -// ret - error code (0: no error) -// +/** + * probe udp.disconnect.return - returning from udp.disconnect probe + * @name: Name of this probe + * @ret: Error code (0: no error) + * + * Context: + * The process which disconnects udp + */ probe udp.disconnect.return = kernel.function("udp_disconnect").return { name = "udp.disconnect" ret = $return -- 2.43.5