X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-context.c;h=ad6c38f0241486f78392cb82f5348a15d83187a6;hb=735bef4705cc42f25d26f25be09ba98f1efb8511;hp=e2032162e514c8e1aac85e6ee88a13c559cc0cb8;hpb=53569322d40ed45abe0368ddb08eb4a2738afc37;p=lttng-ust.git diff --git a/liblttng-ust/lttng-context.c b/liblttng-ust/lttng-context.c index e2032162..ad6c38f0 100644 --- a/liblttng-ust/lttng-context.c +++ b/liblttng-ust/lttng-context.c @@ -20,7 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ - +#define _LGPL_SOURCE #include #include #include @@ -55,14 +55,6 @@ int lttng_find_context(struct lttng_ctx *ctx, const char *name) return 0; } -int lttng_context_is_app(const char *name) -{ - if (strncmp(name, "$app.", strlen("$app.")) != 0) { - return 0; - } - return 1; -} - int lttng_get_context_index(struct lttng_ctx *ctx, const char *name) { unsigned int i; @@ -380,6 +372,41 @@ int lttng_session_context_init(struct lttng_ctx **ctx) WARN("Cannot add context lttng_add_cpu_id_to_ctx"); goto error; } + ret = lttng_add_cgroup_ns_to_ctx(ctx); + if (ret) { + WARN("Cannot add context lttng_add_cgroup_ns_to_ctx"); + goto error; + } + ret = lttng_add_ipc_ns_to_ctx(ctx); + if (ret) { + WARN("Cannot add context lttng_add_ipc_ns_to_ctx"); + goto error; + } + ret = lttng_add_mnt_ns_to_ctx(ctx); + if (ret) { + WARN("Cannot add context lttng_add_mnt_ns_to_ctx"); + goto error; + } + ret = lttng_add_net_ns_to_ctx(ctx); + if (ret) { + WARN("Cannot add context lttng_add_net_ns_to_ctx"); + goto error; + } + ret = lttng_add_pid_ns_to_ctx(ctx); + if (ret) { + WARN("Cannot add context lttng_add_pid_ns_to_ctx"); + goto error; + } + ret = lttng_add_user_ns_to_ctx(ctx); + if (ret) { + WARN("Cannot add context lttng_add_user_ns_to_ctx"); + goto error; + } + ret = lttng_add_uts_ns_to_ctx(ctx); + if (ret) { + WARN("Cannot add context lttng_add_uts_ns_to_ctx"); + goto error; + } lttng_context_update(*ctx); return 0; @@ -387,3 +414,14 @@ error: lttng_destroy_context(*ctx); return ret; } + +/* For backward compatibility. Leave those exported symbols in place. */ +struct lttng_ctx *lttng_static_ctx; + +void lttng_context_init(void) +{ +} + +void lttng_context_exit(void) +{ +}