From: Mathieu Desnoyers Date: Mon, 3 May 2021 14:24:48 +0000 (-0400) Subject: Rename struct lttng_bytecode_runtime to struct lttng_kernel_bytecode_runtime X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=218585b9b0ab4586da4b6fc55c85a70b0b201151;p=lttng-modules.git Rename struct lttng_bytecode_runtime to struct lttng_kernel_bytecode_runtime Signed-off-by: Mathieu Desnoyers Change-Id: I14051998b44fde8aa94f72c227b89786d40ca4ff --- diff --git a/include/lttng/events-internal.h b/include/lttng/events-internal.h index fa9cc35a..2d5c4b12 100644 --- a/include/lttng/events-internal.h +++ b/include/lttng/events-internal.h @@ -20,7 +20,7 @@ struct lttng_kernel_event_common_private { uint64_t user_token; int has_enablers_without_filter_bytecode; - /* list of struct lttng_bytecode_runtime, sorted by seqnum */ + /* list of struct lttng_kernel_bytecode_runtime, sorted by seqnum */ struct list_head filter_bytecode_runtime_head; enum lttng_kernel_abi_instrumentation instrumentation; /* Selected by instrumentation */ diff --git a/include/lttng/events.h b/include/lttng/events.h index 40f95dcf..5b312d14 100644 --- a/include/lttng/events.h +++ b/include/lttng/events.h @@ -337,11 +337,11 @@ struct lttng_kernel_bytecode_node { struct lttng_interpreter_output; -struct lttng_bytecode_runtime { +struct lttng_kernel_bytecode_runtime { /* Associated bytecode */ enum lttng_kernel_bytecode_type type; struct lttng_kernel_bytecode_node *bc; - int (*interpreter_func)(struct lttng_bytecode_runtime *kernel_bytecode, + int (*interpreter_func)(struct lttng_kernel_bytecode_runtime *kernel_bytecode, const char *interpreter_stack_data, struct lttng_probe_ctx *lttng_probe_ctx, void *caller_ctx); diff --git a/include/lttng/lttng-bytecode.h b/include/lttng/lttng-bytecode.h index 6313b2cc..1ffb115e 100644 --- a/include/lttng/lttng-bytecode.h +++ b/include/lttng/lttng-bytecode.h @@ -34,9 +34,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; @@ -284,17 +284,17 @@ struct lttng_interpreter_output { const char *lttng_bytecode_print_op(enum bytecode_op op); -void lttng_bytecode_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_kernel_event_desc *event_desc, struct bytecode_runtime *bytecode); -int lttng_bytecode_interpret_error(struct lttng_bytecode_runtime *bytecode_runtime, +int lttng_bytecode_interpret_error(struct lttng_kernel_bytecode_runtime *bytecode_runtime, const char *stack_data, struct lttng_probe_ctx *probe_ctx, void *ctx); -int lttng_bytecode_interpret(struct lttng_bytecode_runtime *kernel_bytecode, +int lttng_bytecode_interpret(struct lttng_kernel_bytecode_runtime *kernel_bytecode, const char *interpreter_stack_data, struct lttng_probe_ctx *lttng_probe_ctx, void *caller_ctx); diff --git a/src/lttng-bytecode-interpreter.c b/src/lttng-bytecode-interpreter.c index 8ffe2f41..be0a3248 100644 --- a/src/lttng-bytecode-interpreter.c +++ b/src/lttng-bytecode-interpreter.c @@ -209,7 +209,7 @@ int stack_strcmp(struct estack *stack, int top, const char *cmp_type) } int lttng_bytecode_interpret_error( - struct lttng_bytecode_runtime *bytecode_runtime __attribute__((unused)), + struct lttng_kernel_bytecode_runtime *bytecode_runtime __attribute__((unused)), const char *stack_data __attribute__((unused)), struct lttng_probe_ctx *probe_ctx __attribute__((unused)), void *ctx __attribute__((unused))) @@ -756,7 +756,7 @@ void dbg_load_ref_user_str_printk(const struct estack_entry *user_str_reg) * For CAPTURE bytecode: expect a struct lttng_interpreter_output * * as @ctx argument. */ -int lttng_bytecode_interpret(struct lttng_bytecode_runtime *kernel_bytecode, +int lttng_bytecode_interpret(struct lttng_kernel_bytecode_runtime *kernel_bytecode, const char *interpreter_stack_data, struct lttng_probe_ctx *lttng_probe_ctx, void *caller_ctx) @@ -1852,7 +1852,7 @@ int lttng_kernel_interpret_event_filter(const struct lttng_kernel_event_common * struct lttng_probe_ctx *probe_ctx, void *event_filter_ctx __attribute__((unused))) { - struct lttng_bytecode_runtime *filter_bc_runtime; + struct lttng_kernel_bytecode_runtime *filter_bc_runtime; struct list_head *filter_bytecode_runtime_head = &event->priv->filter_bytecode_runtime_head; struct lttng_kernel_bytecode_filter_ctx bytecode_filter_ctx; bool filter_record = false; diff --git a/src/lttng-bytecode.c b/src/lttng-bytecode.c index 6ccd72c7..fbd9147f 100644 --- a/src/lttng-bytecode.c +++ b/src/lttng-bytecode.c @@ -411,7 +411,7 @@ static int bytecode_is_linked(struct lttng_kernel_bytecode_node *bytecode, struct list_head *bytecode_runtime_head) { - struct lttng_bytecode_runtime *bc_runtime; + struct lttng_kernel_bytecode_runtime *bc_runtime; list_for_each_entry(bc_runtime, bytecode_runtime_head, node) { if (bc_runtime->bc == bytecode) @@ -500,7 +500,7 @@ alloc_error: return ret; } -void lttng_bytecode_sync_state(struct lttng_bytecode_runtime *runtime) +void lttng_bytecode_sync_state(struct lttng_kernel_bytecode_runtime *runtime) { struct lttng_kernel_bytecode_node *bc = runtime->bc; @@ -524,7 +524,7 @@ void lttng_enabler_link_bytecode(const struct lttng_kernel_event_desc *event_des struct list_head *enabler_bytecode_head) { struct lttng_kernel_bytecode_node *enabler_bc; - struct lttng_bytecode_runtime *runtime; + struct lttng_kernel_bytecode_runtime *runtime; WARN_ON_ONCE(!event_desc); diff --git a/src/lttng-event-notifier-notification.c b/src/lttng-event-notifier-notification.c index 99ca8a29..0ba566ba 100644 --- a/src/lttng-event-notifier-notification.c +++ b/src/lttng-event-notifier-notification.c @@ -443,7 +443,7 @@ void lttng_event_notifier_notification_send(struct lttng_kernel_event_notifier * } if (unlikely(notif_ctx->eval_capture)) { - struct lttng_bytecode_runtime *capture_bc_runtime; + struct lttng_kernel_bytecode_runtime *capture_bc_runtime; /* * Iterate over all the capture bytecodes. If the interpreter diff --git a/src/lttng-events.c b/src/lttng-events.c index 354a2bc3..4cb0f037 100644 --- a/src/lttng-events.c +++ b/src/lttng-events.c @@ -2677,7 +2677,7 @@ void lttng_session_sync_event_enablers(struct lttng_session *session) list_for_each_entry(event_recorder_priv, &session->events, node) { struct lttng_kernel_event_recorder *event_recorder = event_recorder_priv->pub; struct lttng_enabler_ref *enabler_ref; - struct lttng_bytecode_runtime *runtime; + struct lttng_kernel_bytecode_runtime *runtime; int enabled = 0, has_enablers_without_filter_bytecode = 0; int nr_filters = 0; @@ -2771,7 +2771,7 @@ void lttng_event_notifier_group_sync_enablers(struct lttng_event_notifier_group list_for_each_entry(event_notifier_priv, &event_notifier_group->event_notifiers_head, node) { struct lttng_kernel_event_notifier *event_notifier = event_notifier_priv->pub; struct lttng_enabler_ref *enabler_ref; - struct lttng_bytecode_runtime *runtime; + struct lttng_kernel_bytecode_runtime *runtime; int enabled = 0, has_enablers_without_filter_bytecode = 0; int nr_filters = 0, nr_captures = 0;