X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-bytecode.c;h=93cd02ebcad1e6634d65e0bf72961dbc712b73bc;hb=c0c0989ab70574e09b2f7e8b48c2da6af664a849;hp=30d3cbd105d2eb029f83482ab1f013ade312c496;hpb=d37ecb3fc622dee6f80f84c21f38d32eef407262;p=lttng-ust.git diff --git a/liblttng-ust/lttng-bytecode.c b/liblttng-ust/lttng-bytecode.c index 30d3cbd1..93cd02eb 100644 --- a/liblttng-ust/lttng-bytecode.c +++ b/liblttng-ust/lttng-bytecode.c @@ -1,27 +1,9 @@ /* - * lttng-bytecode.c - * - * LTTng UST bytecode code. + * SPDX-License-Identifier: MIT * * Copyright (C) 2010-2016 Mathieu Desnoyers * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * LTTng UST bytecode code. */ #define _LGPL_SOURCE @@ -298,21 +280,21 @@ int apply_context_reloc(struct bytecode_runtime *runtime, struct load_op *op; struct lttng_ctx_field *ctx_field; int idx; - struct lttng_ctx *ctx = *runtime->p.pctx; + struct lttng_ctx **pctx = runtime->p.pctx; dbg_printf("Apply context reloc: %u %s\n", reloc_offset, context_name); /* Get context index */ - idx = lttng_get_context_index(ctx, context_name); + idx = lttng_get_context_index(*pctx, context_name); if (idx < 0) { if (lttng_context_is_app(context_name)) { int ret; ret = lttng_ust_add_app_context_to_ctx_rcu(context_name, - &ctx); + pctx); if (ret) return ret; - idx = lttng_get_context_index(ctx, context_name); + idx = lttng_get_context_index(*pctx, context_name); if (idx < 0) return -ENOENT; } else { @@ -324,7 +306,7 @@ int apply_context_reloc(struct bytecode_runtime *runtime, return -EINVAL; /* Get context return type */ - ctx_field = &ctx->fields[idx]; + ctx_field = &(*pctx)->fields[idx]; op = (struct load_op *) &runtime->code[reloc_offset]; switch (bytecode_op) { @@ -632,8 +614,3 @@ void lttng_free_event_notifier_filter_runtime( { free_filter_runtime(&event_notifier->filter_bytecode_runtime_head); } - -/* For backward compatibility. Leave those exported symbols in place. */ -void lttng_filter_sync_state(struct lttng_bytecode_runtime *runtime) -{ -}