fix some errors and warnings in the porting
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Mon, 8 Feb 2010 21:50:41 +0000 (16:50 -0500)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Mon, 15 Feb 2010 05:40:25 +0000 (00:40 -0500)
include/ust/kernelcompat.h
libust/buffers.c
libust/serialize.c
libust/tracectl.c

index da2326192928cd3d81e233a1f4120d2598e101fe..4b43b7e3de02b03ab61156e06719b4ffe9600531 100644 (file)
@@ -22,6 +22,8 @@
 #define KERN_ALERT ""
 #define KERN_WARNING ""
 
+#define WARN_ON_ONCE(msg) WARN_ON(msg)
+
 /* ERROR OPS */
 
 #define MAX_ERRNO      4095
index 708575a9a4e583eea8784b94f3cfc8242b3982dd..c644cfb72ad2ddc50e6fa324d3a17082cf8ed61b 100644 (file)
@@ -346,10 +346,10 @@ static notrace void ltt_buf_unfull(struct ust_buffer *buf,
  * architecture does not reorder writes.  This should eventually be provided by
  * a separate architecture-specific infrastructure.
  */
-static void remote_mb(void *info)
-{
-       smp_mb();
-}
+//ust// static void remote_mb(void *info)
+//ust// {
+//ust//        smp_mb();
+//ust// }
 
 int ust_buffers_get_subbuf(struct ust_buffer *buf, long *consumed)
 {
@@ -545,20 +545,20 @@ int ust_buffers_put_subbuf(struct ust_buffer *buf, unsigned long uconsumed_old)
 //ust//        }
 //ust// }
 
-static void ust_buffers_print_written(struct ust_channel *chan,
-               long cons_off, unsigned int cpu)
-{
-       struct ust_buffer *buf = chan->buf[cpu];
-       long cons_idx, events_count;
-
-       cons_idx = SUBBUF_INDEX(cons_off, chan);
-       events_count = local_read(&buf->commit_count[cons_idx].events);
-
-       if (events_count)
-               printk(KERN_INFO
-                       "channel %s: %lu events written (cpu %u, index %lu)\n",
-                       chan->channel_name, events_count, cpu, cons_idx);
-}
+//ust// static void ust_buffers_print_written(struct ust_channel *chan,
+//ust//                long cons_off, unsigned int cpu)
+//ust// {
+//ust//        struct ust_buffer *buf = chan->buf[cpu];
+//ust//        long cons_idx, events_count;
+//ust//
+//ust//        cons_idx = SUBBUF_INDEX(cons_off, chan);
+//ust//        events_count = local_read(&buf->commit_count[cons_idx].events);
+//ust//
+//ust//        if (events_count)
+//ust//                printk(KERN_INFO
+//ust//                        "channel %s: %lu events written (cpu %u, index %lu)\n",
+//ust//                        chan->channel_name, events_count, cpu, cons_idx);
+//ust// }
 
 static void ltt_relay_print_subbuffer_errors(
                struct ust_channel *channel,
@@ -604,9 +604,9 @@ static void ltt_relay_print_errors(struct ust_trace *trace,
        if (!channel)
                return;
 
-       for (cons_off = 0; cons_off < rchan->alloc_size;
-            cons_off = SUBBUF_ALIGN(cons_off, rchan))
-               ust_buffers_print_written(ltt_chan, cons_off, cpu);
+//ust//        for (cons_off = 0; cons_off < rchan->alloc_size;
+//ust//             cons_off = SUBBUF_ALIGN(cons_off, rchan))
+//ust//                ust_buffers_print_written(ltt_chan, cons_off, cpu);
        for (cons_off = atomic_long_read(&ltt_buf->consumed);
                        (SUBBUF_TRUNC(local_read(&ltt_buf->offset),
                                      channel)
index 7f9ce5ad44f2a4f80cd77c68ca593fe0096120c8..6a8688420369ee073d3ae3fba779ed70d23181e1 100644 (file)
@@ -537,7 +537,7 @@ notrace size_t ltt_serialize_data(struct ust_buffer *buf, size_t buf_offset,
                        ++fmt;                  /* skip first '%' */
                        if (*fmt == '%')        /* Escaped %% */
                                break;
-                       fmt = parse_c_type(fmt, &c_size, &c_type);
+                       fmt = parse_c_type(fmt, &c_size, &c_type, NULL);
                        /*
                         * Output c types if no trace types has been
                         * specified.
index 0a8fc8e80f2e2d2e7bdbc3ead5df30a97d40a61f..c0bf6d2d7536702e02bcf07c9a39f35f7f872689 100644 (file)
@@ -1117,6 +1117,11 @@ static void __attribute__((constructor)) init()
                /* Ensure markers are initialized */
                init_markers();
 
+               /* Ensure buffers are initialized, for the transport to be available.
+                * We are about to set a trace type and it will fail without this.
+                */
+               init_ustrelay_transport();
+
                /* FIXME: When starting early tracing (here), depending on the
                 * order of constructors, it is very well possible some marker
                 * sections are not yet registered. Because of this, some
This page took 0.026874 seconds and 4 git commands to generate.