node->target_pc = target_pc;
memcpy(&node->stack, stack, sizeof(node->stack));
ret = cds_lfht_add_unique(ht, hash, lttng_hash_match,
node->target_pc = target_pc;
memcpy(&node->stack, stack, sizeof(node->stack));
ret = cds_lfht_add_unique(ht, hash, lttng_hash_match,
if (ret != &node->node) {
struct lfht_mp_node *ret_mp =
caa_container_of(ret, struct lfht_mp_node, node);
if (ret != &node->node) {
struct lfht_mp_node *ret_mp =
caa_container_of(ret, struct lfht_mp_node, node);
*/
static
int bin_op_compare_check(struct vstack *stack, const char *str)
{
if (unlikely(!vstack_ax(stack) || !vstack_bx(stack)))
*/
static
int bin_op_compare_check(struct vstack *stack, const char *str)
{
if (unlikely(!vstack_ax(stack) || !vstack_bx(stack)))
case FILTER_OP_LOAD_FIELD_REF_STRING:
case FILTER_OP_LOAD_FIELD_REF_SEQUENCE:
case FILTER_OP_LOAD_FIELD_REF_S64:
case FILTER_OP_LOAD_FIELD_REF_STRING:
case FILTER_OP_LOAD_FIELD_REF_SEQUENCE:
case FILTER_OP_LOAD_FIELD_REF_S64:
- if (vstack_ax(stack)->type != REG_S64) {
- ERR("Logical comparator expects S64 register\n");
+ if (vstack_ax(stack)->type != REG_S64
+ && vstack_ax(stack)->type != REG_UNKNOWN) {
+ ERR("Logical comparator expects S64 or dynamic register\n");
- ERR("Unknown get context ref type\n");
- ret = -EINVAL;
- goto end;
+ struct load_op *insn = (struct load_op *) pc;
+ struct field_ref *ref = (struct field_ref *) insn->data;
+
+ dbg_printf("Validate get context ref offset %u type dynamic\n",
+ ref->offset);
+ break;
int validate_instruction_all_contexts(struct bytecode_runtime *bytecode,
struct cds_lfht *merge_points,
struct vstack *stack,
int validate_instruction_all_contexts(struct bytecode_runtime *bytecode,
struct cds_lfht *merge_points,
struct vstack *stack,
/* Validate the context resulting from the previous instruction */
ret = validate_instruction_context(bytecode, stack, start_pc, pc);
/* Validate the context resulting from the previous instruction */
ret = validate_instruction_context(bytecode, stack, start_pc, pc);
lttng_hash_seed);
cds_lfht_lookup(merge_points, hash, lttng_hash_match,
lttng_hash_seed);
cds_lfht_lookup(merge_points, hash, lttng_hash_match,
node = cds_lfht_iter_get_node(&iter);
if (node) {
mp_node = caa_container_of(node, struct lfht_mp_node, node);
node = cds_lfht_iter_get_node(&iter);
if (node) {
mp_node = caa_container_of(node, struct lfht_mp_node, node);
int exec_insn(struct bytecode_runtime *bytecode,
struct cds_lfht *merge_points,
struct vstack *stack,
int exec_insn(struct bytecode_runtime *bytecode,
struct cds_lfht *merge_points,
struct vstack *stack,
/*
* For each instruction, validate the current context
* (traversal of entire execution flow), and validate
/*
* For each instruction, validate the current context
* (traversal of entire execution flow), and validate