As it should be an useful debug mechanism. Signed-off-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> Acked-by: Jan Beulich <jbeul...@suse.com> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com>
-- Cc: Ian Jackson <ian.jack...@eu.citrix.com> Cc: Jan Beulich <jbeul...@suse.com> Cc: Keir Fraser <k...@xen.org> Cc: Tim Deegan <t...@xen.org> v2: s/char */const void * v5: s/ssize_t/unsigned int/ v6: Remove pointless initializers, use string literal instead of %s, add Jan's Ack. v7: Add Andrew's Reviewed-by --- --- xen/common/xsplice.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xen/common/xsplice.c b/xen/common/xsplice.c index 05064ae..934dd22 100644 --- a/xen/common/xsplice.c +++ b/xen/common/xsplice.c @@ -16,6 +16,7 @@ #include <xen/spinlock.h> #include <xen/string.h> #include <xen/symbols.h> +#include <xen/version.h> #include <xen/virtual_region.h> #include <xen/vmap.h> #include <xen/wait.h> @@ -1363,10 +1364,15 @@ static const char *state2str(uint32_t state) static void xsplice_printall(unsigned char key) { struct payload *data; + const void *binary_id = NULL; + unsigned int len = 0; unsigned int i; printk("'%c' pressed - Dumping all xsplice patches\n", key); + if ( !xen_build_id(&binary_id, &len) ) + printk("build-id: %*phN\n", len, binary_id); + if ( !spin_trylock(&payload_lock) ) { printk("Lock held. Try again.\n"); @@ -1403,6 +1409,12 @@ static void xsplice_printall(unsigned char key) static int __init xsplice_init(void) { + const void *binary_id; + unsigned int len; + + if ( !xen_build_id(&binary_id, &len) ) + printk(XENLOG_INFO XSPLICE ": build-id: %*phN\n", len, binary_id); + register_keyhandler('x', xsplice_printall, "print xsplicing info", 1); arch_xsplice_init(); -- 2.5.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel