projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bytecode: add `REG_U64` interpreter register type
[lttng-modules.git]
/
src
/
lttng-filter-interpreter.c
diff --git
a/src/lttng-filter-interpreter.c
b/src/lttng-filter-interpreter.c
index 4aefb04ed50a43ed10b895091c5001c7cb59e4b5..7c05c24f97786127fbdd8fffc94ae83fcbcd8c80 100644
(file)
--- a/
src/lttng-filter-interpreter.c
+++ b/
src/lttng-filter-interpreter.c
@@
-262,7
+262,8
@@
LABEL_##name
#endif
#endif
-#define IS_INTEGER_REGISTER(reg_type) (reg_type == REG_S64)
+#define IS_INTEGER_REGISTER(reg_type) \
+ (reg_type == REG_S64 || reg_type == REG_U64)
static int context_get_index(struct lttng_probe_ctx *lttng_probe_ctx,
struct load_ptr *ptr,
static int context_get_index(struct lttng_probe_ctx *lttng_probe_ctx,
struct load_ptr *ptr,
@@
-504,7
+505,7
@@
static int dynamic_load_field(struct estack_entry *stack_top)
case OBJECT_TYPE_U8:
dbg_printk("op load field u8\n");
stack_top->u.v = *(uint8_t *) stack_top->u.ptr.ptr;
case OBJECT_TYPE_U8:
dbg_printk("op load field u8\n");
stack_top->u.v = *(uint8_t *) stack_top->u.ptr.ptr;
- stack_top->type = REG_
S
64;
+ stack_top->type = REG_
U
64;
break;
case OBJECT_TYPE_U16:
{
break;
case OBJECT_TYPE_U16:
{
@@
-515,7
+516,7
@@
static int dynamic_load_field(struct estack_entry *stack_top)
if (stack_top->u.ptr.rev_bo)
__swab16s(&tmp);
stack_top->u.v = tmp;
if (stack_top->u.ptr.rev_bo)
__swab16s(&tmp);
stack_top->u.v = tmp;
- stack_top->type = REG_
S
64;
+ stack_top->type = REG_
U
64;
break;
}
case OBJECT_TYPE_U32:
break;
}
case OBJECT_TYPE_U32:
@@
-527,7
+528,7
@@
static int dynamic_load_field(struct estack_entry *stack_top)
if (stack_top->u.ptr.rev_bo)
__swab32s(&tmp);
stack_top->u.v = tmp;
if (stack_top->u.ptr.rev_bo)
__swab32s(&tmp);
stack_top->u.v = tmp;
- stack_top->type = REG_
S
64;
+ stack_top->type = REG_
U
64;
break;
}
case OBJECT_TYPE_U64:
break;
}
case OBJECT_TYPE_U64:
@@
-539,7
+540,7
@@
static int dynamic_load_field(struct estack_entry *stack_top)
if (stack_top->u.ptr.rev_bo)
__swab64s(&tmp);
stack_top->u.v = tmp;
if (stack_top->u.ptr.rev_bo)
__swab64s(&tmp);
stack_top->u.v = tmp;
- stack_top->type = REG_
S
64;
+ stack_top->type = REG_
U
64;
break;
}
case OBJECT_TYPE_STRING:
break;
}
case OBJECT_TYPE_STRING:
@@
-779,6
+780,7
@@
uint64_t lttng_filter_interpret_bytecode(void *filter_data,
/* LTTNG_FILTER_DISCARD or LTTNG_FILTER_RECORD_FLAG */
switch (estack_ax_t) {
case REG_S64:
/* LTTNG_FILTER_DISCARD or LTTNG_FILTER_RECORD_FLAG */
switch (estack_ax_t) {
case REG_S64:
+ case REG_U64:
retval = !!estack_ax_v;
break;
case REG_DOUBLE:
retval = !!estack_ax_v;
break;
case REG_DOUBLE:
@@
-1016,7
+1018,7
@@
uint64_t lttng_filter_interpret_bytecode(void *filter_data,
res = ((uint64_t) estack_bx_v >> (uint32_t) estack_ax_v);
estack_pop(stack, top, ax, bx, ax_t, bx_t);
estack_ax_v = res;
res = ((uint64_t) estack_bx_v >> (uint32_t) estack_ax_v);
estack_pop(stack, top, ax, bx, ax_t, bx_t);
estack_ax_v = res;
- estack_ax_t = REG_
S
64;
+ estack_ax_t = REG_
U
64;
next_pc += sizeof(struct binary_op);
PO;
}
next_pc += sizeof(struct binary_op);
PO;
}
@@
-1037,7
+1039,7
@@
uint64_t lttng_filter_interpret_bytecode(void *filter_data,
res = ((uint64_t) estack_bx_v << (uint32_t) estack_ax_v);
estack_pop(stack, top, ax, bx, ax_t, bx_t);
estack_ax_v = res;
res = ((uint64_t) estack_bx_v << (uint32_t) estack_ax_v);
estack_pop(stack, top, ax, bx, ax_t, bx_t);
estack_ax_v = res;
- estack_ax_t = REG_
S
64;
+ estack_ax_t = REG_
U
64;
next_pc += sizeof(struct binary_op);
PO;
}
next_pc += sizeof(struct binary_op);
PO;
}
@@
-1053,7
+1055,7
@@
uint64_t lttng_filter_interpret_bytecode(void *filter_data,
res = ((uint64_t) estack_bx_v & (uint64_t) estack_ax_v);
estack_pop(stack, top, ax, bx, ax_t, bx_t);
estack_ax_v = res;
res = ((uint64_t) estack_bx_v & (uint64_t) estack_ax_v);
estack_pop(stack, top, ax, bx, ax_t, bx_t);
estack_ax_v = res;
- estack_ax_t = REG_
S
64;
+ estack_ax_t = REG_
U
64;
next_pc += sizeof(struct binary_op);
PO;
}
next_pc += sizeof(struct binary_op);
PO;
}
@@
-1069,7
+1071,7
@@
uint64_t lttng_filter_interpret_bytecode(void *filter_data,
res = ((uint64_t) estack_bx_v | (uint64_t) estack_ax_v);
estack_pop(stack, top, ax, bx, ax_t, bx_t);
estack_ax_v = res;
res = ((uint64_t) estack_bx_v | (uint64_t) estack_ax_v);
estack_pop(stack, top, ax, bx, ax_t, bx_t);
estack_ax_v = res;
- estack_ax_t = REG_
S
64;
+ estack_ax_t = REG_
U
64;
next_pc += sizeof(struct binary_op);
PO;
}
next_pc += sizeof(struct binary_op);
PO;
}
@@
-1085,7
+1087,7
@@
uint64_t lttng_filter_interpret_bytecode(void *filter_data,
res = ((uint64_t) estack_bx_v ^ (uint64_t) estack_ax_v);
estack_pop(stack, top, ax, bx, ax_t, bx_t);
estack_ax_v = res;
res = ((uint64_t) estack_bx_v ^ (uint64_t) estack_ax_v);
estack_pop(stack, top, ax, bx, ax_t, bx_t);
estack_ax_v = res;
- estack_ax_t = REG_
S
64;
+ estack_ax_t = REG_
U
64;
next_pc += sizeof(struct binary_op);
PO;
}
next_pc += sizeof(struct binary_op);
PO;
}
This page took
0.0247 seconds
and
4
git commands to generate.