Commit 9d7a6ab1 authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼 Committed by Steffen Vogel
Browse files

print signal count both before and after hooks

parent e9025204
......@@ -544,10 +544,11 @@ char * node_name_long(struct vnode *n)
char uuid[37];
uuid_unparse(n->uuid, uuid);
strcatf(&n->_name_long, "%s: uuid=%s, #in.signals=%zu, #out.signals=%zu, #in.hooks=%zu, #out.hooks=%zu, in.vectorize=%d, out.vectorize=%d",
strcatf(&n->_name_long, "%s: uuid=%s, #in.signals=%zu(%zu), #out.signals=%zu(%zu), #in.hooks=%zu, #out.hooks=%zu, in.vectorize=%d, out.vectorize=%d",
node_name(n), uuid,
vlist_length(&n->in.signals), vlist_length(&n->out.signals),
vlist_length(&n->in.hooks), vlist_length(&n->out.hooks),
vlist_length(&n->in.signals), vlist_length(node_input_signals(n)),
vlist_length(&n->out.signals), vlist_length(node_output_signals(n)),
vlist_length(&n->in.hooks), vlist_length(&n->out.hooks),
n->in.vectorize, n->out.vectorize
);
......
......@@ -345,12 +345,6 @@ int path_prepare(struct vpath *p, NodeList &nodes)
return ret;
}
/* Prepare pool */
pool_size = MAX(1UL, vlist_length(&p->destinations)) * p->queuelen;
ret = pool_init(&p->pool, pool_size, SAMPLE_LENGTH(vlist_length(&p->signals)), pool_mt);
if (ret)
return ret;
/* Autodetect whether to use original sequence numbers or not */
if (p->original_sequence_no == -1)
p->original_sequence_no = vlist_length(&p->sources) == 1;
......@@ -373,12 +367,19 @@ int path_prepare(struct vpath *p, NodeList &nodes)
}
#ifdef WITH_HOOKS
/* Prepare path hooks */
int m = p->builtin ? (int) Hook::Flags::PATH | (int) Hook::Flags::BUILTIN : 0;
/* Add internal hooks if they are not already in the list */
hook_list_prepare(&p->hooks, &p->signals, m, p, nullptr);
#endif /* WITH_HOOKS */
/* Prepare pool */
pool_size = MAX(1UL, vlist_length(&p->destinations)) * p->queuelen;
ret = pool_init(&p->pool, pool_size, SAMPLE_LENGTH(vlist_length(path_output_signals(p))), pool_mt);
if (ret)
return ret;
p->logger->info("Prepared path {} with {} output signals", path_name(p), vlist_length(path_output_signals(p)));
signal_list_dump(p->logger, path_output_signals(p));
......@@ -588,11 +589,12 @@ int path_start(struct vpath *p)
break;
}
p->logger->info("Starting path {}: #signals={}, #hooks={}, #sources={}, "
p->logger->info("Starting path {}: #signals={}({}), #hooks={}, #sources={}, "
"#destinations={}, mode={}, poll={}, mask={:b}, rate={}, "
"enabled={}, reversed={}, queuelen={}, original_sequence_no={}",
path_name(p),
vlist_length(&p->signals),
vlist_length(path_output_signals(p)),
vlist_length(&p->hooks),
vlist_length(&p->sources),
vlist_length(&p->destinations),
......
......@@ -57,7 +57,7 @@ int path_source_init_master(struct vpath_source *ps, struct vnode *n)
if (ps->node->_vt->pool_size)
pool_size = ps->node->_vt->pool_size;
ret = pool_init(&ps->pool, pool_size, SAMPLE_LENGTH(vlist_length(&ps->node->in.signals)), node_memory_type(ps->node));
ret = pool_init(&ps->pool, pool_size, SAMPLE_LENGTH(vlist_length(node_input_signals(ps->node))), node_memory_type(ps->node));
  • This breaks hooks that modify the signal list. This causes an "Pool underrun for path source" warning

Please register or sign in to reply
if (ret)
return ret;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment