X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=include%2Flttng%2Flttng-bytecode.h;h=cd0d8fbedc81542b55004e04826fbc29aaf5cda0;hb=860c213b645593fa19d7a3abf7ffdd1282f0a1c6;hp=79a562bfb5c50f57ecff10958f126737e177bb4f;hpb=0b365677b4b159fa9aa2b98eb19f10f4a762fbe8;p=lttng-modules.git diff --git a/include/lttng/lttng-bytecode.h b/include/lttng/lttng-bytecode.h index 79a562bf..cd0d8fbe 100644 --- a/include/lttng/lttng-bytecode.h +++ b/include/lttng/lttng-bytecode.h @@ -13,6 +13,7 @@ #include #include +#include #include /* Interpreter stack length, in number of entries */ @@ -34,9 +35,9 @@ do { \ } while (0) #endif -/* Linked bytecode. Child of struct lttng_bytecode_runtime. */ +/* Linked bytecode. Child of struct lttng_kernel_bytecode_runtime. */ struct bytecode_runtime { - struct lttng_bytecode_runtime p; + struct lttng_kernel_bytecode_runtime p; size_t data_len; size_t data_alloc_len; char *data; @@ -71,6 +72,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, @@ -93,7 +97,7 @@ struct bytecode_get_index_data { * interpreter needs to find it from the event fields and types to * support variants. */ - const struct lttng_event_field *field; + const struct lttng_kernel_event_field *field; struct { size_t len; enum object_type type; @@ -105,7 +109,7 @@ struct bytecode_get_index_data { struct vstack_load { enum load_type type; enum object_type object_type; - const struct lttng_event_field *field; + const struct lttng_kernel_event_field *field; bool rev_bo; /* reverse byte order */ }; @@ -182,7 +186,7 @@ struct load_ptr { uint64_t u64; double d; } u; - const struct lttng_event_field *field; + const struct lttng_kernel_event_field *field; }; struct estack_entry { @@ -274,23 +278,26 @@ struct lttng_interpreter_output { size_t nr_elem; /* Inner type. */ - const struct lttng_type *nested_type; + const struct lttng_kernel_type_common *nested_type; } sequence; } u; }; const char *lttng_bytecode_print_op(enum bytecode_op op); -void lttng_bytecode_filter_sync_state(struct lttng_bytecode_runtime *runtime); +void lttng_bytecode_sync_state(struct lttng_kernel_bytecode_runtime *runtime); int lttng_bytecode_validate(struct bytecode_runtime *bytecode); -int lttng_bytecode_specialize(const struct lttng_event_desc *event_desc, +int lttng_bytecode_specialize(const struct lttng_kernel_event_desc *event_desc, struct bytecode_runtime *bytecode); -uint64_t lttng_bytecode_filter_interpret_false(void *filter_data, - struct lttng_probe_ctx *lttng_probe_ctx, - const char *filter_stack_data); -uint64_t lttng_bytecode_filter_interpret(void *filter_data, - struct lttng_probe_ctx *lttng_probe_ctx, - const char *filter_stack_data); +int lttng_bytecode_interpret_error(struct lttng_kernel_bytecode_runtime *bytecode_runtime, + const char *stack_data, + struct lttng_kernel_probe_ctx *probe_ctx, + void *ctx); + +int lttng_bytecode_interpret(struct lttng_kernel_bytecode_runtime *kernel_bytecode, + const char *interpreter_stack_data, + struct lttng_kernel_probe_ctx *lttng_probe_ctx, + void *caller_ctx); #endif /* _LTTNG_FILTER_H */