Filter: opcode for ref load
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 13 Jul 2012 20:05:56 +0000 (16:05 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 13 Jul 2012 20:05:56 +0000 (16:05 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/lib/lttng-ctl/filter-bytecode.h
src/lib/lttng-ctl/filter-visitor-generate-bytecode.c

index 07cf99b2dcd46f8f06423046857dcd193812c117..e9df11db60d02f85eceb6a8b2003132cf0720f8d 100644 (file)
@@ -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,
index 8e18a1a622ac65a918792012ada24c3719fc9f8c..8c8bf51ce26b07e8dc0576c3f232869c4292a8db 100644 (file)
@@ -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);
This page took 0.026849 seconds and 4 git commands to generate.