diff options
author | ddomingo <ddomingo@redhat.com> | 2008-11-27 08:20:25 +1000 |
---|---|---|
committer | ddomingo <ddomingo@redhat.com> | 2008-11-27 08:20:25 +1000 |
commit | b292269455060d2f07dfa83749f9a7766c478c5a (patch) | |
tree | 684b52c7d3c598e26f22eba2f0b1db232788c526 | |
parent | c41e99c8f098302a9ed2eb4fcac6ff5e7cd79cab (diff) | |
parent | c31df222427089e752256c58fceb6f077bdc53ce (diff) | |
download | systemtap-steved-b292269455060d2f07dfa83749f9a7766c478c5a.tar.gz systemtap-steved-b292269455060d2f07dfa83749f9a7766c478c5a.tar.xz systemtap-steved-b292269455060d2f07dfa83749f9a7766c478c5a.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | buildrun.cxx | 2 | ||||
-rw-r--r-- | doc/ChangeLog | 14 | ||||
-rw-r--r-- | doc/SystemTap_Tapset_Reference/Makefile.am | 4 | ||||
-rw-r--r-- | doc/SystemTap_Tapset_Reference/Makefile.in | 4 | ||||
-rw-r--r-- | doc/SystemTap_Tapset_Reference/tapsets.tmpl | 46 | ||||
-rw-r--r-- | main.cxx | 15 | ||||
-rw-r--r-- | runtime/ChangeLog | 4 | ||||
-rw-r--r-- | runtime/autoconf-synchronize-sched.c | 6 | ||||
-rw-r--r-- | tapset/ChangeLog | 11 | ||||
-rw-r--r-- | tapset/ioscheduler.stp | 29 | ||||
-rw-r--r-- | tapset/process.stp | 69 | ||||
-rw-r--r-- | tapset/socket.stp | 432 | ||||
-rw-r--r-- | tapset/tcp.stp | 167 | ||||
-rw-r--r-- | tapset/udp.stp | 119 | ||||
-rw-r--r-- | testsuite/systemtap.examples/ChangeLog | 5 | ||||
-rw-r--r-- | testsuite/systemtap.examples/general/para-callgraph.meta | 2 | ||||
-rw-r--r-- | translate.cxx | 6 |
18 files changed, 495 insertions, 450 deletions
@@ -1,3 +1,13 @@ +2008-11-26 Frank Ch. Eigler <fche@elastic.org> + + * main.cxx (main): Advise users to try '--vp ...' after a pass error. + +2008-11-26 Frank Ch. Eigler <fche@elastic.org> + + * translate.cxx (emit_module_exit): Call synchronize_sched during + module shutdown if it's available. + * buildrun.cxx (compile_pass): Test for it. + 2008-11-25 Frank Ch. Eigler <fche@elastic.org> PR 7046. diff --git a/buildrun.cxx b/buildrun.cxx index c23a4747..9eeab4ba 100644 --- a/buildrun.cxx +++ b/buildrun.cxx @@ -112,6 +112,8 @@ compile_pass (systemtap_session& s) o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-uaccess.c, -DSTAPCONF_LINUX_UACCESS_H,)" << endl; o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-oneachcpu-retry.c, -DSTAPCONF_ONEACHCPU_RETRY,)" << endl; o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-dpath-path.c, -DSTAPCONF_DPATH_PATH,)" << endl; + o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-synchronize-sched.c, -DSTAPCONF_SYNCHRONIZE_SCHED,)" << endl; + #if 0 /* NB: For now, the performance hit of probe_kernel_read/write (vs. our * homegrown safe-access functions) is deemed undesireable, so we'll skip diff --git a/doc/ChangeLog b/doc/ChangeLog index 41060910..e2ad1d80 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,17 @@ +2008-11-26 Will Cohen <wcohen@redhat.com> + + * SystemTap_Tapset_Reference/tapsets.am: Correct location for html/man. + * SystemTap_Tapset_Reference/tapsets.in: Regenerate. + +2008-11-26 Will Cohen <wcohen@redhat.com> + + * SystemTap_Tapset_Reference/tapsets.tmpl: Add process. + +2008-11-25 Will Cohen <wcohen@redhat.com> + + * SystemTap_Tapset_Reference/tapsets.tmpl: Add ioscheduler, socket, tcp, + and upd. + 2008-11-24 Will Cohen <wcohen@redhat.com> * SystemTap_Tapset_Reference/tapsets.tmpl: Add context, timestamp, diff --git a/doc/SystemTap_Tapset_Reference/Makefile.am b/doc/SystemTap_Tapset_Reference/Makefile.am index 8327e900..c196e977 100644 --- a/doc/SystemTap_Tapset_Reference/Makefile.am +++ b/doc/SystemTap_Tapset_Reference/Makefile.am @@ -22,13 +22,13 @@ xmldocs: docproc SRCTREE=$(SRCTREE) $(DOCPROC) doc $(abs_srcdir)/tapsets.tmpl > tapsets.xml htmldocs: xmldocs - xmlto html -o tapset tapsets.xml + xmlto html -o tapsets tapsets.xml pdfdocs: xmldocs xmlto pdf tapsets.xml mandocs: xmldocs - xmlto man tapsets.xml + xmlto man -o man5 tapsets.xml #FIXME need to figure out where to install things appropriately #installmandocs: mandocs diff --git a/doc/SystemTap_Tapset_Reference/Makefile.in b/doc/SystemTap_Tapset_Reference/Makefile.in index 5dff66f8..b61be1b7 100644 --- a/doc/SystemTap_Tapset_Reference/Makefile.in +++ b/doc/SystemTap_Tapset_Reference/Makefile.in @@ -441,13 +441,13 @@ xmldocs: docproc SRCTREE=$(SRCTREE) $(DOCPROC) doc $(abs_srcdir)/tapsets.tmpl > tapsets.xml htmldocs: xmldocs - xmlto html -o tapset tapsets.xml + xmlto html -o tapsets tapsets.xml pdfdocs: xmldocs xmlto pdf tapsets.xml mandocs: xmldocs - xmlto man tapsets.xml + xmlto man -o man5 tapsets.xml #FIXME need to figure out where to install things appropriately #installmandocs: mandocs diff --git a/doc/SystemTap_Tapset_Reference/tapsets.tmpl b/doc/SystemTap_Tapset_Reference/tapsets.tmpl index ccdba8c2..6c3abd0f 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 </chapter> + <chapter id="iosched.stp"> + <title>IO Scheduler Tapset</title> + <para> + This family of probe points is used to probe the IO scheduler activities. + It contains the following probe points: + </para> +!Itapset/ioscheduler.stp + </chapter> + + <chapter id="networking.stp"> <title>Networking Tapset</title> <para> @@ -150,4 +160,40 @@ This is common among !Itapset/networking.stp </chapter> + <chapter id="socket.stp"> + <title>Socket Tapset</title> + <para> + This family of probe points is used to probe socket activities. + It contains the following probe points: + </para> +!Itapset/socket.stp + </chapter> + + <chapter id="tcp.stp"> + <title>TCP Tapset</title> + <para> + This family of probe points is used to probe TCP layer activities. + It contains the following probe points: + </para> +!Itapset/tcp.stp + </chapter> + + <chapter id="upd.stp"> + <title>UDP Tapset</title> + <para> + This family of probe points is used to probe UDP layer activities. + It contains the following probe points: + </para> +!Itapset/udp.stp + </chapter> + + <chapter id="process.stp"> + <title>Process Tapset</title> + <para> + This family of probe points is used to probe the process activities. + It contains the following probe points: + </para> +!Itapset/process.stp + </chapter> + </book> @@ -746,6 +746,9 @@ main (int argc, char * const argv []) } int rc = 0; + + // PASS 0: setting up + s.verbose = s.perpass_verbose[0]; // For PR1477, we used to override $PATH and $LC_ALL and other stuff // here. We seem to use complete pathnames in @@ -804,7 +807,6 @@ main (int argc, char * const argv []) // PASS 1a: PARSING USER SCRIPT - s.verbose = s.perpass_verbose[0]; struct stat user_file_stat; int user_file_stat_rc = -1; @@ -939,7 +941,7 @@ main (int argc, char * const argv []) if (rc) cerr << "Pass 1: parse failed. " - << "Try again with more '-v' (verbose) options." + << "Try again with another '--vp 1' option." << endl; if (rc || s.last_pass == 1 || pending_interrupts) goto cleanup; @@ -967,7 +969,7 @@ main (int argc, char * const argv []) if (rc) cerr << "Pass 2: analysis failed. " - << "Try again with more '-v' (verbose) options." + << "Try again with another '--vp 01' option." << endl; // Generate hash. There isn't any point in generating the hash // if last_pass is 2, since we'll quit before using it. @@ -1026,7 +1028,7 @@ main (int argc, char * const argv []) if (rc) cerr << "Pass 3: translation failed. " - << "Try again with more '-v' (verbose) options." + << "Try again with another '--vp 001' option." << endl; if (rc || s.last_pass == 3 || pending_interrupts) goto cleanup; @@ -1054,7 +1056,7 @@ main (int argc, char * const argv []) if (rc) cerr << "Pass 4: compilation failed. " - << "Try again with more '-v' (verbose) options." + << "Try again with another '--vp 0001' option." << endl; else { @@ -1098,11 +1100,12 @@ pass_5: if (rc) cerr << "Pass 5: run failed. " - << "Try again with more '-v' (verbose) options." + << "Try again with another '--vp 00001' option." << endl; // if (rc) goto cleanup; + // PASS 6: cleaning up cleanup: // update the database information diff --git a/runtime/ChangeLog b/runtime/ChangeLog index 91a932c4..f3c5f2e3 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,7 @@ +2008-11-26 Frank Ch. Eigler <fche@elastic.org> + + * autoconf-synchronize-sched.c: New file. + 2008-11-25 Frank Ch. Eigler <fche@elastic.org> PR 7046. diff --git a/runtime/autoconf-synchronize-sched.c b/runtime/autoconf-synchronize-sched.c new file mode 100644 index 00000000..0291092e --- /dev/null +++ b/runtime/autoconf-synchronize-sched.c @@ -0,0 +1,6 @@ +#include <linux/sched.h> + +void foo (void) +{ + synchronize_sched (); +} diff --git a/tapset/ChangeLog b/tapset/ChangeLog index 20b564ca..75e49f75 100644 --- a/tapset/ChangeLog +++ b/tapset/ChangeLog @@ -1,3 +1,14 @@ +2008-11-26 Will Cohen <wcohen@redhat.com> + + * process.stp: Add kernel-doc notation. + +2008-11-25 Will Cohen <wcohen@redhat.com> + + * ioscheduler.stp: + * socket.stp: + * tcp.stp: + * udp.stp: Add kernel-doc notation. + 2008-11-24 Will Cohen <wcohen@redhat.com> * context.stp: diff --git a/tapset/ioscheduler.stp b/tapset/ioscheduler.stp index 017bcc27..d7a71aca 100644 --- a/tapset/ioscheduler.stp +++ b/tapset/ioscheduler.stp @@ -11,7 +11,10 @@ #include <linux/elevator.h> %} -/* 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/process.stp b/tapset/process.stp index ba97226b..b28a72cd 100644 --- a/tapset/process.stp +++ b/tapset/process.stp @@ -12,17 +12,16 @@ function _IS_ERR:long(ptr:long) %{ /* pure */ %} -/* probe process.create - * - * Fires whenever a new process is successfully created, either as a result of - * one of the fork syscall variants, or a new kernel thread. +/** + * probe process.create - New process created + * @task: A handle to the newly created process + * @new_pid: PID of the newly created process * * Context: * Parent of the created process. * - * Arguments: - * task - a handle to the newly created process. - * new_pid - pid of the newly created process. + * Fires whenever a new process is successfully created, either as a result of + * one of the fork syscall variants, or a new kernel thread. */ probe process.create = kernel.function("copy_process").return { task = $return @@ -31,25 +30,26 @@ probe process.create = kernel.function("copy_process").return { } -/* probe process.start - * - * Fires immediately before a new process begins execution. +/** + * probe process.start - Starting new process * * Context: * Newly created process. + * + * Fires immediately before a new process begins execution. + * */ probe process.start = kernel.function("schedule_tail") { } -/* probe process.exec - * - * Fires whenever a process attempts to exec to a new program. +/** + * probe process.exec - Attempt to exec to a new program + * @filename: The path to the new executable * * Context: * The caller of exec. * - * Arguments: - * filename - the path to the new executable + * Fires whenever a process attempts to exec to a new program. */ probe process.exec = kernel.function("do_execve"), @@ -59,17 +59,16 @@ probe process.exec = } -/* probe process.exec_complete - * - * Fires at the completion of an exec call. +/** + * probe process.exec_complete - Return from exec to a new program + * @errno: The error number resulting from the exec + * @success: A boolean indicating whether the exec was successful * * Context: * On success, the context of the new executable. * On failure, remains in the context of the caller. * - * Arguments: - * errno - the error number resulting from the exec - * success - a boolean indicating whether the exec was successful + * Fires at the completion of an exec call. */ probe process.exec_complete = kernel.function("do_execve").return, @@ -80,36 +79,34 @@ probe process.exec_complete = } -/* probe process.exit - * - * Fires when a process terminates. This will always be followed by a - * process.release, though the latter may be delayed if the process waits in a - * zombie state. +/** + * probe process.exit - Exit from process + * @code: The exit code of the process * * Context: * The process which is terminating. * - * Arguments: - * code - the exit code of the process + * Fires when a process terminates. This will always be followed by a + * process.release, though the latter may be delayed if the process waits in a + * zombie state. */ probe process.exit = kernel.function("do_exit") { code = $code } -/* probe process.release - * - * Fires when a process is released from the kernel. This always follows a - * process.exit, though it may be delayed somewhat if the process waits in a - * zombie state. +/** + * probe process.release - Process released + * @task: A task handle to the process being released + * @pid: PID of the process being released * * Context: * The context of the parent, if it wanted notification of this process' * termination, else the context of the process itself. * - * Arguments: - * task - a task handle to the process being released - * pid - pid of the process being released + * Fires when a process is released from the kernel. This always follows a + * process.exit, though it may be delayed somewhat if the process waits in a + * zombie state. */ probe process.release = kernel.function("release_task") { task = $p diff --git a/tapset/socket.stp b/tapset/socket.stp index 5c521a33..842dbfc4 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 7fa48000..995d6abc 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 1559058b..984df692 100644 --- a/tapset/udp.stp +++ b/tapset/udp.stp @@ -13,102 +13,85 @@ #include <net/ip.h> %} -// 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 diff --git a/testsuite/systemtap.examples/ChangeLog b/testsuite/systemtap.examples/ChangeLog index f5370d73..01675733 100644 --- a/testsuite/systemtap.examples/ChangeLog +++ b/testsuite/systemtap.examples/ChangeLog @@ -1,5 +1,10 @@ 2008-11-25 Mark Wielaard <mjw@redhat.com> + * general/para-callgraph.meta: Add accidentially removed -c back + to test_installcheck. + +2008-11-25 Mark Wielaard <mjw@redhat.com> + * general/para-callgraph.meta: Don't use single quotes. 2008-11-20 Frank Ch. Eigler <fche@elastic.org> diff --git a/testsuite/systemtap.examples/general/para-callgraph.meta b/testsuite/systemtap.examples/general/para-callgraph.meta index 14b83dea..87af07cf 100644 --- a/testsuite/systemtap.examples/general/para-callgraph.meta +++ b/testsuite/systemtap.examples/general/para-callgraph.meta @@ -4,4 +4,4 @@ keywords: trace callgraph subsystem: general description: Print a timed per-thread callgraph, complete with function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger. test_check: stap -p4 para-callgraph.stp kernel.function("*@fs/proc*.c") kernel.function("sys_read") -test_installcheck: stap para-callgraph.stp kernel.function("*@fs/proc*.c") kernel.function("sys_read") "cat /proc/sys/vm/*" +test_installcheck: stap para-callgraph.stp kernel.function("*@fs/proc*.c") kernel.function("sys_read") -c "cat /proc/sys/vm/*" diff --git a/translate.cxx b/translate.cxx index 1cf7361e..41a424ed 100644 --- a/translate.cxx +++ b/translate.cxx @@ -1287,6 +1287,11 @@ c_unparser::emit_module_exit () o->newline () << "yield ();"; // aka schedule() and then some o->newline(-2) << "} while (holdon);"; + // + o->newline() << "#ifdef STAPCONF_SYNCHRONIZE_SCHED"; + o->newline() << "synchronize_sched();"; + o->newline() << "#endif"; + // XXX: might like to have an escape hatch, in case some probe is // genuinely stuck somehow @@ -4860,6 +4865,7 @@ translate_pass (systemtap_session& s) s.op->newline() << "#include \"stat.c\""; s.op->newline() << "#include <linux/string.h>"; s.op->newline() << "#include <linux/timer.h>"; + s.op->newline() << "#include <linux/sched.h>"; s.op->newline() << "#include <linux/delay.h>"; s.op->newline() << "#include <linux/profile.h>"; s.op->newline() << "#include <linux/random.h>"; |