From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v3 15/23] xsplice: Print build_id in keyhandler. Date: Tue, 16 Feb 2016 20:13:13 +0000 Message-ID: <56C382D9.7060501@citrix.com> References: <1455300361-13092-1-git-send-email-konrad.wilk@oracle.com> <1455300361-13092-16-git-send-email-konrad.wilk@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aVlzp-0004PY-Iq for xen-devel@lists.xenproject.org; Tue, 16 Feb 2016 20:13:17 +0000 In-Reply-To: <1455300361-13092-16-git-send-email-konrad.wilk@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, konrad@kernel.org, mpohlack@amazon.de, ross.lagerwall@citrix.com, sasha.levin@citrix.com, jinsong.liu@alibaba-inc.com, Ian Campbell , Ian Jackson , Jan Beulich , Keir Fraser , Tim Deegan , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 12/02/16 18:05, Konrad Rzeszutek Wilk wrote: > As it should be an useful debug mechanism. > > Signed-off-by: Konrad Rzeszutek Wilk > --- > 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 > #include > #include > +#include > #include > #include > #include > @@ -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); >