Implement session statedump command
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 14 Apr 2016 19:41:15 +0000 (15:41 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 30 Jun 2016 18:02:57 +0000 (14:02 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-abi.c
lttng-abi.h
lttng-events.c
lttng-events.h

index 4dd9273f1eb9a0551d343dfd7706b0893f45fb2d..e193f4377734d1a47a8d881125de8d93befe0cc3 100644 (file)
@@ -569,6 +569,8 @@ long lttng_session_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                return lttng_session_list_tracker_pids(session);
        case LTTNG_KERNEL_SESSION_METADATA_REGEN:
                return lttng_session_metadata_regenerate(session);
+       case LTTNG_KERNEL_SESSION_STATEDUMP:
+               return lttng_session_statedump(session);
        default:
                return -ENOIOCTLCMD;
        }
index 9b9a2323b66f20f26eb498027f0e507728e5cc2b..ff1520c3b43f5276b550212c9ca31a121f693496 100644 (file)
@@ -204,6 +204,8 @@ struct lttng_kernel_filter_bytecode {
  */
 #define LTTNG_KERNEL_SESSION_LIST_TRACKER_PIDS _IO(0xF6, 0x58)
 #define LTTNG_KERNEL_SESSION_METADATA_REGEN    _IO(0xF6, 0x59)
+/* 0x5A and 0x5B are reserved for a future ABI-breaking cleanup. */
+#define LTTNG_KERNEL_SESSION_STATEDUMP         _IO(0xF6, 0x5C)
 
 /* Channel FD ioctl */
 #define LTTNG_KERNEL_STREAM                    _IO(0xF6, 0x62)
index 928886f3f9fdf0b2f1f993e13290288b618f3ae9..bcf59da1df5d8916ae7e85c01f9e5a6639743d25 100644 (file)
@@ -213,6 +213,16 @@ void lttng_session_destroy(struct lttng_session *session)
        kfree(session);
 }
 
+int lttng_session_statedump(struct lttng_session *session)
+{
+       int ret;
+
+       mutex_lock(&sessions_mutex);
+       ret = lttng_statedump_start(session);
+       mutex_unlock(&sessions_mutex);
+       return ret;
+}
+
 int lttng_session_enable(struct lttng_session *session)
 {
        int ret = 0;
index 9c8f03b8d4fc27849cf31c557e44de78da350fd8..9e05e2f9a56b044c8c690fbbc2ac75a3889d2c58 100644 (file)
@@ -533,6 +533,7 @@ int lttng_session_enable(struct lttng_session *session);
 int lttng_session_disable(struct lttng_session *session);
 void lttng_session_destroy(struct lttng_session *session);
 int lttng_session_metadata_regenerate(struct lttng_session *session);
+int lttng_session_statedump(struct lttng_session *session);
 void metadata_cache_destroy(struct kref *kref);
 
 struct lttng_channel *lttng_channel_create(struct lttng_session *session,
This page took 0.028223 seconds and 4 git commands to generate.