X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=liblttng-ust%2Flttng-bytecode.h;h=c0e90c45bc5744ad99a3f7b5f4d4a76b81e956f4;hb=e88c7263a3440484b3968f6abc314efd40f0c3f4;hp=5742f7f5c34eae8cad45294494f73818add7f942;hpb=4d451c15c1e519f108b1b6d01fbda2c6975a2a3b;p=lttng-ust.git diff --git a/liblttng-ust/lttng-bytecode.h b/liblttng-ust/lttng-bytecode.h index 5742f7f5..c0e90c45 100644 --- a/liblttng-ust/lttng-bytecode.h +++ b/liblttng-ust/lttng-bytecode.h @@ -1,38 +1,20 @@ -#ifndef _LTTNG_BYTECODE_H -#define _LTTNG_BYTECODE_H - /* - * lttng-bytecode.h - * - * LTTng UST bytecode header. + * 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 header. */ +#ifndef _LTTNG_BYTECODE_H +#define _LTTNG_BYTECODE_H + #include #include #include -#include +#include #include -#include +#include #include #include #include @@ -112,6 +94,9 @@ enum object_type { OBJECT_TYPE_U32, OBJECT_TYPE_U64, + OBJECT_TYPE_SIGNED_ENUM, + OBJECT_TYPE_UNSIGNED_ENUM, + OBJECT_TYPE_DOUBLE, OBJECT_TYPE_STRING, OBJECT_TYPE_STRING_SEQUENCE, @@ -329,17 +314,34 @@ struct lttng_interpreter_output { } u; }; +/* Should be hidden but would break the ABI */ const char *print_op(enum bytecode_op op); +LTTNG_HIDDEN void lttng_bytecode_filter_sync_state(struct lttng_bytecode_runtime *runtime); +LTTNG_HIDDEN +void lttng_bytecode_capture_sync_state(struct lttng_bytecode_runtime *runtime); +LTTNG_HIDDEN int lttng_bytecode_validate(struct bytecode_runtime *bytecode); +LTTNG_HIDDEN int lttng_bytecode_specialize(const struct lttng_event_desc *event_desc, struct bytecode_runtime *bytecode); +LTTNG_HIDDEN uint64_t lttng_bytecode_filter_interpret_false(void *filter_data, const char *filter_stack_data); +LTTNG_HIDDEN uint64_t lttng_bytecode_filter_interpret(void *filter_data, const char *filter_stack_data); +LTTNG_HIDDEN +uint64_t lttng_bytecode_capture_interpret_false(void *capture_data, + const char *capture_stack_data, + struct lttng_interpreter_output *output); +LTTNG_HIDDEN +uint64_t lttng_bytecode_capture_interpret(void *capture_data, + const char *capture_stack_data, + struct lttng_interpreter_output *output); + #endif /* _LTTNG_BYTECODE_H */