Add wait quiescent ioctl
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 Jun 2011 20:57:39 +0000 (16:57 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 Jun 2011 20:57:39 +0000 (16:57 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
ltt-debugfs-abi.c
ltt-debugfs-abi.h
ltt-events.c
ltt-events.h

index aa8dc0f4a0d973af21f4739aa373170cfb63a9d6..c6d9f602bba8c451aa9518cd62a6b5e79bcb5306 100644 (file)
@@ -196,6 +196,8 @@ long lttng_abi_add_context(struct file *file,
  *             Returns the LTTng kernel tracer version
  *     LTTNG_KERNEL_TRACEPOINT_LIST
  *             Returns a file descriptor listing available tracepoints
+ *     LTTNG_KERNEL_WAIT_QUIESCENT
+ *             Returns after all previously running probes have completed
  *
  * The returned session will be deleted when its file descriptor is closed.
  */
index 8dc0fde9b8c4cd59738438f41f9ec76bb4f86326..e3a7160b9f423040fb9d6aa6f4918cdc9d7f30e5 100644 (file)
@@ -94,6 +94,7 @@ struct lttng_kernel_context {
 #define LTTNG_KERNEL_TRACER_VERSION            \
        _IOR(0xF6, 0x41, struct lttng_kernel_tracer_version)
 #define LTTNG_KERNEL_TRACEPOINT_LIST           _IO(0xF6, 0x42)
+#define LTTNG_KERNEL_WAIT_QUIESCENT            _IO(0xF6, 0x43)
 
 /* Session FD ioctl */
 #define LTTNG_KERNEL_METADATA                  \
index 42d486c195d73c8cdfd265b6a54a5d2bd20950ec..3457699f812edfaa347aec64086321b2aa341b49 100644 (file)
@@ -34,8 +34,6 @@ int _ltt_event_metadata_statedump(struct ltt_session *session,
 static
 int _ltt_session_metadata_statedump(struct ltt_session *session);
 
-
-static
 void synchronize_trace(void)
 {
        synchronize_sched();
@@ -108,12 +106,9 @@ int ltt_session_enable(struct ltt_session *session)
 
        ACCESS_ONCE(session->active) = 1;
        ACCESS_ONCE(session->been_active) = 1;
-       synchronize_trace();    /* Wait for in-flight events to complete */
        ret = _ltt_session_metadata_statedump(session);
-       if (ret) {
+       if (ret)
                ACCESS_ONCE(session->active) = 0;
-               synchronize_trace();    /* Wait for in-flight events to complete */
-       }
 end:
        mutex_unlock(&sessions_mutex);
        return ret;
@@ -129,7 +124,6 @@ int ltt_session_disable(struct ltt_session *session)
                goto end;
        }
        ACCESS_ONCE(session->active) = 0;
-       synchronize_trace();    /* Wait for in-flight events to complete */
 end:
        mutex_unlock(&sessions_mutex);
        return ret;
index f3536cec1e76645a87f2da30fc9e394711ae0a16..4cb4919ff87a8620bfa5c40b959168f115229340 100644 (file)
@@ -273,6 +273,7 @@ int ltt_event_disable(struct ltt_event *event);
 void ltt_transport_register(struct ltt_transport *transport);
 void ltt_transport_unregister(struct ltt_transport *transport);
 
+void synchronize_trace(void);
 int ltt_debugfs_abi_init(void);
 void ltt_debugfs_abi_exit(void);
 
This page took 0.02821 seconds and 4 git commands to generate.