Move kernelcompat.h to include/ust/ and share.h, usterr.h to include/
[ust.git] / libust / serialize.c
index bef01780e6bfbdb70179ce30577e00bf863836b4..99d4dce4194e076ea5644d9780a89f14ff33a480 100644 (file)
@@ -3,7 +3,20 @@
  *
  * Copyright Mathieu Desnoyers, March 2007.
  *
- * Licensed under the GPLv2.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+ *
  *
  * See this discussion about weirdness about passing va_list and then va_list to
  * functions. (related to array argument passing). va_list seems to be
 //ust// #include <linux/ltt-tracer.h>
 #include <string.h>
 #include <stdint.h>
-#include "kernelcompat.h"
+
+#include <ust/kernelcompat.h>
+#define _LGPL_SOURCE
+#include <urcu-bp.h>
+#include <urcu/rculist.h>
+
 #include "relay.h"
 #include "tracer.h"
-#include "list.h"
+//#include "list.h"
 #include "usterr.h"
 
 enum ltt_type {
@@ -536,7 +554,6 @@ notrace size_t ltt_serialize_data(struct rchan_buf *buf, size_t buf_offset,
        }
        return buf_offset;
 }
-EXPORT_SYMBOL_GPL(ltt_serialize_data);
 
 /*
  * Calculate data size
@@ -583,7 +600,7 @@ notrace void ltt_vtrace(const struct marker *mdata, void *probe_data,
        struct ltt_serialize_closure closure;
        struct ltt_probe_private_data *private_data = call_data;
        void *serialize_private = NULL;
-       int cpu;
+//ust//        int cpu;
        unsigned int rflags;
 
        /*
@@ -593,8 +610,8 @@ notrace void ltt_vtrace(const struct marker *mdata, void *probe_data,
        if (unlikely(ltt_traces.num_active_traces == 0))
                return;
 
-       rcu_read_lock_sched_notrace();
-       cpu = smp_processor_id();
+       rcu_read_lock(); //ust// rcu_read_lock_sched_notrace();
+//ust//        cpu = smp_processor_id();
 //ust//        __get_cpu_var(ltt_nesting)++;
        ltt_nesting++;
 
@@ -671,14 +688,13 @@ notrace void ltt_vtrace(const struct marker *mdata, void *probe_data,
                va_end(args_copy);
                /* Out-of-order commit */
                ltt_commit_slot(channel, &transport_data, buf_offset,
-                               slot_size);
-               printf("just commited event at offset %d and size %d\n", buf_offset, slot_size);
+                               data_size, slot_size);
+               DBG("just commited event at offset %ld and size %zd", buf_offset, slot_size);
        }
 //ust//        __get_cpu_var(ltt_nesting)--;
        ltt_nesting--;
-       rcu_read_unlock_sched_notrace();
+       rcu_read_unlock(); //ust// rcu_read_unlock_sched_notrace();
 }
-EXPORT_SYMBOL_GPL(ltt_vtrace);
 
 notrace void ltt_trace(const struct marker *mdata, void *probe_data,
                       void *call_data, const char *fmt, ...)
@@ -689,7 +705,6 @@ notrace void ltt_trace(const struct marker *mdata, void *probe_data,
        ltt_vtrace(mdata, probe_data, call_data, fmt, &args);
        va_end(args);
 }
-EXPORT_SYMBOL_GPL(ltt_trace);
 
 //ust// MODULE_LICENSE("GPL");
 //ust// MODULE_AUTHOR("Mathieu Desnoyers");
This page took 0.023827 seconds and 4 git commands to generate.