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

[Xen-devel] Re: [Xen-changelog] Fix xentrace to initialise the trace buffers if they are not set up.



On Sun, May 14, 2006 at 08:56:08PM +0000, Atsushi SAKAI wrote:

> Fix xentrace to initialise the trace buffers if they are not set up.
> Signed-off-by: Atsushi SAKAI <sakaia@xxxxxxxxxxxxxx>

> +#include "xc_private.h"

Please don't do this. It's called "xc_private.h" for a reason.

> +    int ret;
> +    dom0_op_t op;                        /* dom0 op we'll build             
> */
>      int xc_handle = xc_interface_open(); /* for accessing control interface 
> */
> -
> -    if (xc_tbuf_get_size(xc_handle, &size32) != 0)
> -        goto fail;
> -    *size = size32;
> -
> -    if (xc_tbuf_get_mfn(xc_handle, mfn) != 0)
> -        goto fail;
> +    unsigned int tbsize;
> +
> +    enable_tracing_or_die(xc_handle);
> +
> +    if (xc_tbuf_get_size(xc_handle, &tbsize) != 0) {
> +      perror("Failure to get tbuf info from Xen. Guess size is 0?");
> +      exit(1);
> +    }
> +    else
> +      printf("Current tbuf size: 0x%x\n", tbsize);
> +    
> +
> +    op.cmd = DOM0_TBUFCONTROL;
> +    op.interface_version = DOM0_INTERFACE_VERSION;
> +    op.u.tbufcontrol.op  = DOM0_TBUF_GET_INFO;
> +
> +    ret = do_dom0_op(xc_handle, &op);

In particular, don't do this. Only libbxc/xc_tbuf.c can include
xc_private.h. Why have you re-introduced this? Can you fix it back up
please to use get_size/get_mfn()?

thanks,
john

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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