From: Mathieu Desnoyers Date: Fri, 13 Jul 2012 20:05:56 +0000 (-0400) Subject: Filter: opcode for ref load X-Git-Tag: v2.1.0-rc1~90 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=65775683e9e3cc9bdc4aab1b0cab0e5eae042f5e Filter: opcode for ref load Signed-off-by: Mathieu Desnoyers --- diff --git a/src/lib/lttng-ctl/filter-bytecode.h b/src/lib/lttng-ctl/filter-bytecode.h index 07cf99b2d..e9df11db6 100644 --- a/src/lib/lttng-ctl/filter-bytecode.h +++ b/src/lib/lttng-ctl/filter-bytecode.h @@ -35,18 +35,9 @@ enum filter_register { REG_ERROR, }; -enum field_ref_type { - FIELD_REF_UNKNOWN = 0, - FIELD_REF_STRING, - FIELD_REF_SEQUENCE, - FIELD_REF_S64, - FIELD_REF_DOUBLE, -}; - struct field_ref { /* Initially, symbol offset. After link, field offset. */ uint16_t offset; - uint8_t type; /* enum field_ref_type */ } __attribute__((packed)); struct literal_numeric { @@ -95,6 +86,11 @@ enum filter_op { /* load */ FILTER_OP_LOAD_FIELD_REF, + FILTER_OP_LOAD_FIELD_REF_STRING, + FILTER_OP_LOAD_FIELD_REF_SEQUENCE, + FILTER_OP_LOAD_FIELD_REF_S64, + FILTER_OP_LOAD_FIELD_REF_DOUBLE, + FILTER_OP_LOAD_STRING, FILTER_OP_LOAD_S64, FILTER_OP_LOAD_DOUBLE, diff --git a/src/lib/lttng-ctl/filter-visitor-generate-bytecode.c b/src/lib/lttng-ctl/filter-visitor-generate-bytecode.c index 8e18a1a62..8c8bf51ce 100644 --- a/src/lib/lttng-ctl/filter-visitor-generate-bytecode.c +++ b/src/lib/lttng-ctl/filter-visitor-generate-bytecode.c @@ -235,9 +235,8 @@ int visit_node_load(struct filter_parser_ctx *ctx, struct ir_op *node) memcpy(insn->data, &ref_offset, sizeof(ref_offset)); if (insn->reg == REG_ERROR) return -EINVAL; - /* reloc_offset points to struct field_ref */ + /* reloc_offset points to struct load_op */ reloc_offset = bytecode_get_len(&ctx->bytecode->b); - reloc_offset += sizeof(struct load_op); ret = bytecode_push(&ctx->bytecode, insn, 1, insn_len); if (ret) { free(insn);