remove ltt_relay_buffer_flush function
authorAlexis Hallé <alexis.halle@polymtl.ca>
Wed, 14 Jul 2010 18:51:59 +0000 (14:51 -0400)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Wed, 21 Jul 2010 02:20:38 +0000 (22:20 -0400)
All it did was call ltt_force_switch and wake up consumers, when
ltt_force_switch already wakes up the consumers.

libust/buffers.c

index 7b540de880ee68934c80fb8fb19d392b91beb180..801a878cce5dd4c863ed6866fa4c2cbd3a90a0e5 100644 (file)
@@ -771,26 +771,6 @@ error:
        return -1;
 }
 
-/*
- * LTTng channel flush function.
- *
- * Must be called when no tracing is active in the channel, because of
- * accesses across CPUs.
- */
-static notrace void ltt_relay_buffer_flush(struct ust_buffer *buf)
-{
-       int result;
-
-//ust//        buf->finalized = 1;
-       ltt_force_switch(buf, FORCE_FLUSH);
-
-       result = write(buf->data_ready_fd_write, "1", 1);
-       if(result == -1) {
-               PERROR("write (in ltt_relay_buffer_flush)");
-               ERR("this should never happen!");
-       }
-}
-
 static void ltt_relay_async_wakeup_chan(struct ust_channel *ltt_channel)
 {
 //ust//        unsigned int i;
@@ -813,7 +793,7 @@ static void ltt_relay_finish_buffer(struct ust_channel *channel, unsigned int cp
 
        if (channel->buf[cpu]) {
                struct ust_buffer *buf = channel->buf[cpu];
-               ltt_relay_buffer_flush(buf);
+               ltt_force_switch(buf, FORCE_FLUSH);
 //ust//                ltt_relay_wake_writers(ltt_buf);
                /* closing the pipe tells the consumer the buffer is finished */
                
This page took 0.024822 seconds and 4 git commands to generate.