[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v4 28/34] xsplice: Print build_id in keyhandler and on bootup.



As it should be an useful debug mechanism.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
--
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Cc: Jan Beulich <jbeulich@xxxxxxxx>
Cc: Keir Fraser <keir@xxxxxxx>
Cc: Tim Deegan <tim@xxxxxxx>

v2: s/char */const void *
---
 xen/common/xsplice.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/xen/common/xsplice.c b/xen/common/xsplice.c
index e5867bd..effae86 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/vmap.h>
 #include <xen/wait.h>
 #include <xen/xsplice_elf.h>
@@ -1295,8 +1296,13 @@ static const char *state2str(uint32_t state)
 static void xsplice_printall(unsigned char key)
 {
     struct payload *data;
+    const void *binary_id = NULL;
+    ssize_t len = 0;
     unsigned int i;
 
+    if ( !xen_build_id(&binary_id, &len) )
+        printk("build-id: %*phN\n", (int)len, binary_id);
+
     spin_lock_recursive(&payload_lock);
 
     list_for_each_entry ( data, &payload_list, list )
@@ -1319,8 +1325,14 @@ static void xsplice_printall(unsigned char key)
 
 static int __init xsplice_init(void)
 {
+    const void *binary_id = NULL;
+    ssize_t len = 0;
+
     BUILD_BUG_ON( sizeof(struct xsplice_patch_func) != 64 );
 
+    if ( !xen_build_id(&binary_id, &len) )
+        printk(XENLOG_INFO "%s: build-id: %*phN\n", XSPLICE, (int)len, 
binary_id);
+
     register_keyhandler('x', xsplice_printall, "print xsplicing info", 1);
     arch_xsplice_register_find_space(&find_hole);
     return 0;
-- 
2.5.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.