* 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>
*
* 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>
* 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;
return 0;
}
+/* multipoll_destroy: free a struct mpentries
+ */
+
int multipoll_destroy(struct mpentries *ent)
{
int i;
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;
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;
* 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>
--- /dev/null
+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.
* 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>
* 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>
--- /dev/null
+This test checks if tracing works correctly in a child process created by
+a fork() call, as well as after an exec() call.
# 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
* 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>
* 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>