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

Re: [Xen-devel] [PATCH v3 15/23] xsplice: Print build_id in keyhandler.



On 12/02/16 18:05, Konrad Rzeszutek Wilk wrote:
> As it should be an useful debug mechanism.
>
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> ---
>  xen/common/xsplice.c | 18 +++++++++++++++++-
>  1 file changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/xen/common/xsplice.c b/xen/common/xsplice.c
> index 65b1f11..34719fc 100644
> --- a/xen/common/xsplice.c
> +++ b/xen/common/xsplice.c
> @@ -13,6 +13,7 @@
>  #include <xen/smp.h>
>  #include <xen/softirq.h>
>  #include <xen/spinlock.h>
> +#include <xen/version.h>
>  #include <xen/wait.h>
>  #include <xen/xsplice_elf.h>
>  #include <xen/xsplice.h>
> @@ -99,7 +100,22 @@ static const char *state2str(int32_t state)
>  static void xsplice_printall(unsigned char key)
>  {
>      struct payload *data;
> -    unsigned int i;
> +    char *binary_id = NULL;
> +    unsigned int len = 0, i;
> +    int rc;
> +
> +    rc = xen_build_id(&binary_id, &len);
> +    printk("build-id: ");

This line should only be printed if a buildid is included.  Otherwise,
you will repeatedly see -ENODATA if the linker was lacking.

> +    if ( !rc )
> +    {
> +        for ( i = 0; i < len; i++ )
> +        {
> +                   uint8_t c = binary_id[i];
> +                   printk("%02x", c);

Indentation.

Also, the buildid will want printing in the start of day banner.

~Andrew

> +        }
> +           printk("\n");
> +    } else if ( rc < 0 )
> +        printk("rc = %d\n", rc);
>  
>      spin_lock(&payload_lock);
>  


_______________________________________________
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®.