From: Ian Campbell Subject: Re: [PATCH] Plumb through xen-platform device logging Date: Thu, 11 Jul 2013 13:50:56 +0100 Message-ID: <1373547056.5453.184.camel@hastur.hellion.org.uk> References: <1372951983-28428-1-git-send-email-paul.durrant@citrix.com> <9AAE0902D5BC7E449B7C8E4E778ABCD006053C@LONPEX01CL01.citrite.net> <1373543014.5453.179.camel@hastur.hellion.org.uk> <9AAE0902D5BC7E449B7C8E4E778ABCD0060AA7@LONPEX01CL01.citrite.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <9AAE0902D5BC7E449B7C8E4E778ABCD0060AA7@LONPEX01CL01.citrite.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant Cc: Anthony Perard , Stefano Stabellini , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Thu, 2013-07-11 at 13:07 +0100, Paul Durrant wrote: > > Looking at http://wiki.qemu.org/Features/Tracing is the tracing > > interface really the right way to be logging this particular class of > > information? I'd have thought a simple logfile support in the platform > > device would be a much more natural fit. > > > > That makes sense to me, but whoever coded up the platform device > obviously believed tracing to be the correct way to log. I don't know > the history of that decision. I guess either Anthony or Stefano knows. Do you guys know why we log the platform device I/O port debug via the trace subsystems? It doesn't seem like a good fit. A better fit would be the qemu chr subsystem (I think that's the name, I mean the thing which lets you direct serial/parallel etc to file,tcp,sockets etc etc.) > It doesn't change the fact though that, currently, xen builds of QEMU > don't configure any form of tracing backend at all which doesn't seem > particularly helpful, and I did introduce platform logging as an > example of an event to log so I think the patch is useful as far as it > goes, but maybe another patch to the platform device in QEMU would > also be considered a good idea. > > Paul > > > > > $(MAKE) all > > > > > > > > diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c > > > > index 2924298..35f71cc 100644 > > > > --- a/tools/libxl/libxl_dm.c > > > > +++ b/tools/libxl/libxl_dm.c > > > > @@ -370,6 +370,13 @@ static char ** > > > > libxl__build_device_model_args_new(libxl__gc *gc, > > > > "-xen-domid", > > > > libxl__sprintf(gc, "%d", guest_domid), NULL); > > > > > > > > + flexarray_vappend(dm_args, > > > > + "-trace", > > > > + libxl__sprintf(gc, > > > > + "events=%s/qemu-trace-events", > > > > + libxl__xen_config_dir_path()), > > > > + NULL); > > > > Doesn't this end up logging to /etc/xen? Not what we want I think. > > > > or maybe this is just the config file, which, apart from my comments > > about the suitability of the interface above, makes me wonder where the > > logs do go? Ideally they would go to /var/log/xen/qemu-blah-name.log not > > to xl stdout. > > >