From: Mathieu Desnoyers Date: Mon, 3 May 2021 14:33:55 +0000 (-0400) Subject: Move bytecode structures to internal header X-Git-Tag: v2.13.0-rc2~54 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=478a7793bd1d11faaf5d35a4516cc12c30f35a77;p=lttng-modules.git Move bytecode structures to internal header Signed-off-by: Mathieu Desnoyers Change-Id: Ic7931b3fd6d8f4674f7e0a020a4501db4f3ae509 --- diff --git a/include/lttng/events-internal.h b/include/lttng/events-internal.h index b7fb2833..df70273a 100644 --- a/include/lttng/events-internal.h +++ b/include/lttng/events-internal.h @@ -78,6 +78,38 @@ struct lttng_kernel_bytecode_filter_ctx { enum lttng_kernel_bytecode_filter_result result; }; +struct lttng_interpreter_output; + +enum lttng_kernel_bytecode_type { + LTTNG_KERNEL_BYTECODE_TYPE_FILTER, + LTTNG_KERNEL_BYTECODE_TYPE_CAPTURE, +}; + +struct lttng_kernel_bytecode_node { + enum lttng_kernel_bytecode_type type; + struct list_head node; + struct lttng_enabler *enabler; + struct { + uint32_t len; + uint32_t reloc_offset; + uint64_t seqnum; + char data[]; + } bc; +}; + +struct lttng_kernel_bytecode_runtime { + /* Associated bytecode */ + enum lttng_kernel_bytecode_type type; + struct lttng_kernel_bytecode_node *bc; + int (*interpreter_func)(struct lttng_kernel_bytecode_runtime *kernel_bytecode, + const char *interpreter_stack_data, + struct lttng_kernel_probe_ctx *lttng_probe_ctx, + void *caller_ctx); + int link_failed; + struct list_head node; /* list of bytecode runtime in event */ + struct lttng_kernel_ctx *ctx; +}; + /* * Enabler field, within whatever object is enabling an event. Target of * backward reference. diff --git a/include/lttng/events.h b/include/lttng/events.h index eafdf5cf..74e5f1bc 100644 --- a/include/lttng/events.h +++ b/include/lttng/events.h @@ -318,38 +318,6 @@ struct lttng_kernel_probe_desc { struct lttng_krp; /* Kretprobe handling */ -enum lttng_kernel_bytecode_type { - LTTNG_KERNEL_BYTECODE_TYPE_FILTER, - LTTNG_KERNEL_BYTECODE_TYPE_CAPTURE, -}; - -struct lttng_kernel_bytecode_node { - enum lttng_kernel_bytecode_type type; - struct list_head node; - struct lttng_enabler *enabler; - struct { - uint32_t len; - uint32_t reloc_offset; - uint64_t seqnum; - char data[]; - } bc; -}; - -struct lttng_interpreter_output; - -struct lttng_kernel_bytecode_runtime { - /* Associated bytecode */ - enum lttng_kernel_bytecode_type type; - struct lttng_kernel_bytecode_node *bc; - int (*interpreter_func)(struct lttng_kernel_bytecode_runtime *kernel_bytecode, - const char *interpreter_stack_data, - struct lttng_kernel_probe_ctx *lttng_probe_ctx, - void *caller_ctx); - int link_failed; - struct list_head node; /* list of bytecode runtime in event */ - struct lttng_kernel_ctx *ctx; -}; - /* * Objects in a linked-list of enablers, owned by an event. */ diff --git a/include/lttng/lttng-bytecode.h b/include/lttng/lttng-bytecode.h index 87a0c13d..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 */