提交 b93d51dc 编写于 作者: I Ian Campbell 提交者: Ingo Molnar

x86, xen: record and display initiator of each multicall when debugging

Store the caller for each multicall so we can report it on failure.
Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 9033304a
...@@ -39,6 +39,7 @@ struct mc_buffer { ...@@ -39,6 +39,7 @@ struct mc_buffer {
struct multicall_entry entries[MC_BATCH]; struct multicall_entry entries[MC_BATCH];
#if MC_DEBUG #if MC_DEBUG
struct multicall_entry debug[MC_BATCH]; struct multicall_entry debug[MC_BATCH];
void *caller[MC_BATCH];
#endif #endif
unsigned char args[MC_ARGS]; unsigned char args[MC_ARGS];
struct callback { struct callback {
...@@ -154,11 +155,12 @@ void xen_mc_flush(void) ...@@ -154,11 +155,12 @@ void xen_mc_flush(void)
ret, smp_processor_id()); ret, smp_processor_id());
dump_stack(); dump_stack();
for (i = 0; i < b->mcidx; i++) { for (i = 0; i < b->mcidx; i++) {
printk(KERN_DEBUG " call %2d/%d: op=%lu arg=[%lx] result=%ld\n", printk(KERN_DEBUG " call %2d/%d: op=%lu arg=[%lx] result=%ld\t%pF\n",
i+1, b->mcidx, i+1, b->mcidx,
b->debug[i].op, b->debug[i].op,
b->debug[i].args[0], b->debug[i].args[0],
b->entries[i].result); b->entries[i].result,
b->caller[i]);
} }
} }
#endif #endif
...@@ -197,6 +199,9 @@ struct multicall_space __xen_mc_entry(size_t args) ...@@ -197,6 +199,9 @@ struct multicall_space __xen_mc_entry(size_t args)
} }
ret.mc = &b->entries[b->mcidx]; ret.mc = &b->entries[b->mcidx];
#ifdef MC_DEBUG
b->caller[b->mcidx] = __builtin_return_address(0);
#endif
b->mcidx++; b->mcidx++;
ret.args = &b->args[argidx]; ret.args = &b->args[argidx];
b->argidx = argidx + args; b->argidx = argidx + args;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册