Add kernel metadata support to lttng and API
authorDavid Goulet <david.goulet@polymtl.ca>
Tue, 24 May 2011 17:16:15 +0000 (13:16 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Tue, 24 May 2011 17:16:15 +0000 (13:16 -0400)
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
include/lttng/lttng.h
liblttngctl/liblttngctl.c
lttng/lttng.c

index 98d632c7624d60f47d89a70373fab5172b097f51..e47338f4086e9bd47b4a8f997b7f0cb92ebf65e4 100644 (file)
@@ -82,5 +82,6 @@ extern int lttng_kernel_create_session(void);
 extern int lttng_kernel_start_tracing(void);
 extern int lttng_kernel_stop_tracing(void);
 extern int lttng_kernel_create_channel(void);
+extern int lttng_kernel_open_metadata(void);
 
 #endif /* _LIBLTTNGCTL_H */
index 2cf79f4ed96987a9b95c59bb373ee1d80d44d1d0..d782bb07e93459d5ea9cb237de99752a2b6249a5 100644 (file)
@@ -203,6 +203,16 @@ int lttng_kernel_create_channel(void)
        return ask_sessiond(KERNEL_CREATE_CHANNEL, NULL);
 }
 
+/*
+ *  lttng_kernel_open_metadata
+ *
+ *  Open metadata in the kernel tracer.
+ */
+int lttng_kernel_open_metadata(void)
+{
+       return ask_sessiond(KERNEL_OPEN_METADATA, NULL);
+}
+
 /*
  *  lttng_kernel_start_tracing
  *
index c7c88f6315a0a8987912dc003979d0f8454247bd..9714e8a3476c10ad721362bca4d019c1c2fc62ae 100644 (file)
@@ -196,6 +196,12 @@ static int process_kernel_create_trace(void)
                goto error;
        }
 
+       /* Opening metadata for session */
+       ret = lttng_kernel_open_metadata();
+       if (ret < 0) {
+               goto error;
+       }
+
        return 0;
 
 error:
This page took 0.027095 seconds and 4 git commands to generate.