From 31afaf8b83ef975697fe6370daa4e0262ec0ca24 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 29 Sep 2022 16:19:00 -0400 Subject: [PATCH] bytecode: propagate `rev_bo` of element When specializing and executing bytecode. Signed-off-by: Mathieu Desnoyers Change-Id: Ie52cf779ffbe30fa44dd1651142f34b19c0b5b3c --- lttng-filter-interpreter.c | 1 + lttng-filter-specialize.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lttng-filter-interpreter.c b/lttng-filter-interpreter.c index 821c12d3..8c870e14 100644 --- a/lttng-filter-interpreter.c +++ b/lttng-filter-interpreter.c @@ -441,6 +441,7 @@ static int dynamic_get_index(struct lttng_probe_ctx *lttng_probe_ctx, stack_top->u.ptr.type = LOAD_OBJECT; /* field is only used for types nested within variants. */ stack_top->u.ptr.field = NULL; + stack_top->u.ptr.rev_bo = gid->elem.rev_bo; break; } return 0; diff --git a/lttng-filter-specialize.c b/lttng-filter-specialize.c index e9a85c78..7780f64a 100644 --- a/lttng-filter-specialize.c +++ b/lttng-filter-specialize.c @@ -401,6 +401,7 @@ static int specialize_context_lookup(struct bytecode_runtime *runtime, memset(&gid, 0, sizeof(gid)); gid.ctx_index = idx; gid.elem.type = load->object_type; + gid.elem.rev_bo = load->rev_bo; data_offset = bytecode_push_data(runtime, &gid, __alignof__(gid), sizeof(gid)); if (data_offset < 0) { @@ -470,6 +471,7 @@ static int specialize_event_payload_lookup(struct lttng_event *event, memset(&gid, 0, sizeof(gid)); gid.offset = field_offset; gid.elem.type = load->object_type; + gid.elem.rev_bo = load->rev_bo; data_offset = bytecode_push_data(runtime, &gid, __alignof__(gid), sizeof(gid)); if (data_offset < 0) { -- 2.34.1