From: David Goulet Date: Tue, 24 May 2011 17:16:15 +0000 (-0400) Subject: Add kernel metadata support to lttng and API X-Git-Tag: v2.0-pre1~123 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a5c5a2bd8c78b788f6094d80c188af0db78c17ec;p=lttng-tools.git Add kernel metadata support to lttng and API Signed-off-by: David Goulet --- diff --git a/include/lttng/lttng.h b/include/lttng/lttng.h index 98d632c76..e47338f40 100644 --- a/include/lttng/lttng.h +++ b/include/lttng/lttng.h @@ -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 */ diff --git a/liblttngctl/liblttngctl.c b/liblttngctl/liblttngctl.c index 2cf79f4ed..d782bb07e 100644 --- a/liblttngctl/liblttngctl.c +++ b/liblttngctl/liblttngctl.c @@ -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 * diff --git a/lttng/lttng.c b/lttng/lttng.c index c7c88f631..9714e8a34 100644 --- a/lttng/lttng.c +++ b/lttng/lttng.c @@ -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: