Fix tracepoint event related build errors
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 18 Nov 2011 17:16:11 +0000 (12:16 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 18 Nov 2011 17:16:11 +0000 (12:16 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/share.h
include/lttng/tracepoint-event.h
include/lttng/tracepoint.h
liblttng-ust-fork/ustfork.c
liblttng-ust/Makefile.am
snprintf/Makefile.am
tests/fork/ust_tests_fork.h

index 776fc85f70e5198d1aa652b5813c1d366ada6744..19644f120c0b194b79224088da9f69389986c9fc 100644 (file)
@@ -14,6 +14,8 @@
  * modified is included with the above copyright notice.
  */
 
+#include <stdlib.h>
+
 ssize_t patient_write(int fd, const void *buf, size_t count);
 ssize_t patient_send(int fd, const void *buf, size_t count, int flags);
 
index 2cbe4475226be98ac917c1adb27d11ec88e5e326..176e7f3fdd4aff46ea4b5eeea000bfdad413771d 100644 (file)
@@ -22,11 +22,14 @@ extern "C" {
 
 #undef TRACEPOINT_EVENT_INSTANCE
 #define TRACEPOINT_EVENT_INSTANCE(_provider, _template, _name, _args)  \
-       _DEFINE_TRACEPOINT(provider, name)
+       _DEFINE_TRACEPOINT(_provider, _name)
 
 #undef TRACEPOINT_EVENT
 #define TRACEPOINT_EVENT(_provider, _name, _args, _fields)             \
-       TRACEPOINT_EVENT_INSTANCE(_provider, _name, _name, _TP_PARAMS(_args))
+       TRACEPOINT_EVENT_CLASS(_provider, _name, _TP_PARAMS(_args),     \
+                       _TP_PARAMS(_fields))                            \
+       TRACEPOINT_EVENT_INSTANCE(_provider, _name, _name,              \
+                       _TP_PARAMS(_args))
 
 #define TRACEPOINT_INCLUDE     __tp_stringify(TRACEPOINT_INCLUDE_FILE)
 
index e177b87d8cfcf119c1b9ba81c67ea25d5a74088a..2753d95a6f7b44c39ac6e71796c8970303248b92 100644 (file)
@@ -272,7 +272,6 @@ static void __attribute__((destructor)) __tracepoints__destroy(void)
  * the provider:event identifier is limited to 127 characters.
  */
 
-
 #define TRACEPOINT_EVENT(provider, name, args, fields)                 \
        _DECLARE_TRACEPOINT(provider, name, _TP_PARAMS(args))
 
index 5e6acba16e87fb9893ee7c9fe3b756afae12dd38..ac191971fd7b18cca7143fd79f5c1efeec00fcaf 100644 (file)
@@ -33,7 +33,7 @@ struct user_desc;
 pid_t fork(void)
 {
        static pid_t (*plibc_func)(void) = NULL;
-       ust_fork_info_t fork_info;
+       sigset_t sigset;
        pid_t retval;
 
        if (plibc_func == NULL) {
@@ -44,14 +44,14 @@ pid_t fork(void)
                }
        }
 
-       ust_before_fork(&fork_info);
+       ust_before_fork(&sigset);
        /* Do the real fork */
        retval = plibc_func();
        if (retval == 0) {
                /* child */
-               ust_after_fork_child(&fork_info);
+               ust_after_fork_child(&sigset);
        } else {
-               ust_after_fork_parent(&fork_info);
+               ust_after_fork_parent(&sigset);
        }
        return retval;
 }
@@ -59,7 +59,7 @@ pid_t fork(void)
 struct ustfork_clone_info {
        int (*fn)(void *);
        void *arg;
-       ust_fork_info_t fork_info;
+       sigset_t sigset;
 };
 
 static int clone_fn(void *arg)
@@ -67,7 +67,7 @@ static int clone_fn(void *arg)
        struct ustfork_clone_info *info = (struct ustfork_clone_info *) arg;
 
        /* clone is now done and we are in child */
-       ust_after_fork_child(&info->fork_info);
+       ust_after_fork_child(&info->sigset);
        return info->fn(info->arg);
 }
 
@@ -109,11 +109,11 @@ int clone(int (*fn)(void *), void *child_stack, int flags, void *arg, ...)
                /* Creating a real process, we need to intervene. */
                struct ustfork_clone_info info = { fn: fn, arg: arg };
 
-               ust_before_fork(&info.fork_info);
+               ust_before_fork(&info.sigset);
                retval = plibc_func(clone_fn, child_stack, flags, &info,
                                ptid, tls, ctid);
                /* The child doesn't get here. */
-               ust_after_fork_parent(&info.fork_info);
+               ust_after_fork_parent(&info.sigset);
        }
        return retval;
 }
index fef43c2466956dca38c94fbf497ed086ef4500f8..336cf7bf3cac91e33116b57fc3d14104e4fbc9af 100644 (file)
@@ -48,4 +48,4 @@ liblttng_ust_la_LIBADD = \
        $(top_builddir)/liblttng-ust-comm/liblttng-ust-comm.la \
        liblttng-ust-runtime.la liblttng-ust-support.la
 
-liblttng_ust_la_CFLAGS = -DUST_COMPONENT="liblttng-ust" -fno-strict-aliasing
+liblttng_ust_la_CFLAGS = -DUST_COMPONENT="liblttng_ust" -fno-strict-aliasing
index f04846a2a881fc739604c513a13f20592648cc2c..a32ed4f00f07ccd180269fcc165428ee763c6cc2 100644 (file)
@@ -15,7 +15,8 @@ libustsnprintf_la_SOURCES = \
        vfprintf.c \
        wcio.h \
        wsetup.c \
-       core.c
+       core.c \
+       patient_write.c
 
 libustsnprintf_la_LDFLAGS = -no-undefined -static
-libustsnprintf_la_CFLAGS = -DUST_COMPONENT="ust_snprintf" -fPIC -fno-strict-aliasing
+libustsnprintf_la_CFLAGS = -DUST_COMPONENT="lttng_ust_snprintf" -fPIC -fno-strict-aliasing
index 9b3251310b6ff1a1f5ff916c513b7aa4a08c0d76..3d7eb342c63c1cc91919aa3742daeec8c031a5f4 100644 (file)
@@ -44,10 +44,8 @@ TRACEPOINT_EVENT(ust_tests_fork, after_exec,
 
 #endif /* _TRACEPOINT_UST_TESTS_FORK_H */
 
-#undef TRACEPOINT_INCLUDE_PATH
-#define TRACEPOINT_INCLUDE_PATH .
 #undef TRACEPOINT_INCLUDE_FILE
-#define TRACEPOINT_INCLUDE_FILE ust_tests_fork
+#define TRACEPOINT_INCLUDE_FILE ./ust_tests_fork.h
 
 /* This part must be outside ifdef protection */
 #include <lttng/tracepoint-event.h>
This page took 0.028909 seconds and 4 git commands to generate.