add info about what dirs/files are doing
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Wed, 2 Jun 2010 15:47:24 +0000 (11:47 -0400)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Wed, 2 Jun 2010 15:47:24 +0000 (11:47 -0400)
libust/marker-control.c
libust/type-serializer.c
libustcomm/multipoll.c
libustcomm/ustcomm.c
tests/README [new file with mode: 0644]
tests/basic/basic.c
tests/dlopen/dlopen.c
tests/fork/README [new file with mode: 0644]
tests/manual_mode_tracing.sh
tests/test-libustinstr-malloc/prog.c
tests/test-nevents/prog.c

index b4b7ce1a72d7d017cc34c6b05050efc2f0fb3773..db7311a347030d485b24920776bd91d3074c554e 100644 (file)
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
  *
- * LTT marker control module over /proc
+ */
+
+/* This file contains a high-level API for activating and deactivating markers,
+ * and making sure markers in a given library can be released when the library
+ * is unloaded.
  */
 
 #include <ctype.h>
index 5d20960e03a7c58a82a27a8fa6e352ffd568cd00..bf1c4966a67630bd3aee064e57b5cab34255ccdd 100644 (file)
@@ -7,6 +7,9 @@
  *
  * Dual LGPL v2.1/GPL v2 license.
  */
+
+/* This file contains functions for tracepoint custom probes support. */
+
 #include <urcu/rculist.h>
 #include <ust/type-serializer.h>
 #include <ust/core.h>
index 1ac51a58bfacbcbde590acffce61ea95d30a06a7..1210b93dd9d3714ddcb7e9dd17ce2741c2927aa0 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
+/* Multipoll is a framework to poll on several file descriptors and to call
+ * a specific callback depending on the fd that had activity.
+ */
+
 #include <poll.h>
 #include <stdlib.h>
 #include "multipoll.h"
 
 #define INITIAL_N_AVAIL 16
 
+/* multipoll_init
+ *
+ * Initialize an mpentries struct, which is initially empty of any fd.
+ */
+
 int multipoll_init(struct mpentries *ent)
 {
        ent->n_used = 0;
@@ -36,6 +45,9 @@ int multipoll_init(struct mpentries *ent)
        return 0;
 }
 
+/* multipoll_destroy: free a struct mpentries
+ */
+
 int multipoll_destroy(struct mpentries *ent)
 {
        int i;
@@ -52,6 +64,19 @@ int multipoll_destroy(struct mpentries *ent)
        return 0;
 }
 
+/* multipoll_add
+ *
+ * Add a file descriptor to be waited on in a struct mpentries.
+ *
+ * @ent: the struct mpentries to add an fd to
+ * @fd: the fd to wait on
+ * @events: a mask of the types of events to wait on, see the poll(2) man page
+ * @func: the callback function to be called if there is activity on the fd
+ * @priv: the private pointer to pass to func
+ * @destroy_priv: a callback to destroy the priv pointer when the mpentries
+                  is destroyed; may be NULL
+ */
+
 int multipoll_add(struct mpentries *ent, int fd, short events, int (*func)(void *priv, int fd, short events), void *priv, int (*destroy_priv)(void *))
 {
        int cur;
@@ -74,6 +99,16 @@ int multipoll_add(struct mpentries *ent, int fd, short events, int (*func)(void
        return 0;
 }
 
+/* multipoll_poll: do the actual poll on a struct mpentries
+ *
+ * File descriptors should have been already added with multipoll_add().
+ *
+ * A struct mpentries may be reused for multiple multipoll_poll calls.
+ *
+ * @ent: the struct mpentries to poll on.
+ * @timeout: the timeout after which to return if there was no activity.
+ */
+
 int multipoll_poll(struct mpentries *ent, int timeout)
 {
        int result;
index 155dfd0087c53aaba52fa866f87f9eca7a1c457d..d537eebf8a7164b0acf02c415889e6fb632e62fb 100644 (file)
@@ -15,6 +15,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
+/* API used by UST components to communicate with each other via sockets. */
+
 #define _GNU_SOURCE
 #include <sys/types.h>
 #include <signal.h>
diff --git a/tests/README b/tests/README
new file mode 100644 (file)
index 0000000..1c920eb
--- /dev/null
@@ -0,0 +1,10 @@
+Using the ust test suite.
+
+Running
+       ./runtests
+runs all the tests once. The output is in TAP format.
+
+Running
+       ./test_loop
+runs the test in a loop. This is useful to check for errors that would not
+always happen.
index efdfc7d5c116d0c9689f574d514b86564bd6e5a3..a81087784062fedc8e5e2984e924a80b1753f270 100644 (file)
@@ -15,6 +15,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
+/* Basic testing program that just records a few events. */
+
 #include <stdio.h>
 #include <unistd.h>
 
index 9fb0edd90b3dcce49dd9b5e0d51ecec004d0912c..28d0ee6f01a9a9da8fc9cc443f45724c5946a474 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
+/* The aim of this test is to verify whether ust behaves correctly when
+ * tracing a marker that is in a dlopen()'d library. It also checks the
+ * library can be unloaded.
+ */
+
 #include <dlfcn.h>
 #include <stdio.h>
 #include <ust/marker.h>
diff --git a/tests/fork/README b/tests/fork/README
new file mode 100644 (file)
index 0000000..dd57c1d
--- /dev/null
@@ -0,0 +1,2 @@
+This test checks if tracing works correctly in a child process created by
+a fork() call, as well as after an exec() call.
index fd0b61078683a4a0cb1d9f4ab91d684fde8c800a..3f203b1c8d8ecd1636ae7050759bb7add0438bd4 100755 (executable)
 #    You should have received a copy of the GNU General Public License
 #    along with LTTng-UST.  If not, see <http://www.gnu.org/licenses/>.
 
+# This tests manual mode tracing, meaning the process is first started, then
+# the tracing is set up with ustctl. Then verifications are done to make sure
+# all the events that were supposed to be in the trace are there.
+
 TESTDIR=$(dirname $0)
 
 source $TESTDIR/test_functions.sh
index 7d096533e5e6211b1846aa5ec549bf08e761480e..8b3d5fef7cb9a5d82de434bb565a695664860e5a 100644 (file)
@@ -15,6 +15,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
+/* This program is used to test malloc instrumentation with libustinstr-malloc.
+ */
+
 #include <string.h>
 #include <stdlib.h>
 
index 6b80d7faa2cb660760d31dcc0f7fa635136e5b2f..b2350cc1274e7c27e4cc53e0de6ec2509b986964 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
+/* This test generates a trace of a certain number of events. It is used to
+ * check that no events are lost while tracing.
+ */
+
 #include <string.h>
 #include <stdlib.h>
 #include <ust/ust.h>
This page took 0.028577 seconds and 4 git commands to generate.