On 03/26/2013 08:01 AM, Lluís Vilanova wrote: > Add commandline options to control initial loading of dynamic instrumentation > library. > > Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> > ---
> +++ b/instrument/cmdline.c > @@ -0,0 +1,94 @@ > +/* > + * Control dynamic trace instrumentation during program (de)initialization. > + * > + * Copyright (C) 2012 Lluís Vilanova <vilan...@ac.upc.edu> It's 2013. > + > +static bool loaded = false; Static variables are already 0-initialized; not all compilers can optimize an explicit 0-initialization into bss, so it is better to omit '= false'. > + > + exit(-1); Exiting with status 255 is unusual (twice this patch). > +++ b/linux-user/main.c > @@ -34,6 +34,8 @@ > #include "qemu/timer.h" > #include "qemu/envlist.h" > #include "elf.h" > +#include "instrument/cmdline.h" > + > > char *exec_path; > > @@ -3242,6 +3244,22 @@ static void handle_arg_reserved_va(const char *arg) > } > #endif > > +static const char *instrument_path = NULL; Another case of not needing explicit 0-initialization. > +++ b/qmp-commands.hx > @@ -1519,6 +1519,7 @@ Load a dynamic instrumentation library. > Arguments: > > - path: path to the dynamic instrumentation library > +- args: arguments to the dynamic instrumentation library This should have been in an earlier patch. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature