qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 16/22] instrument: Add commandline options to st


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 16/22] instrument: Add commandline options to start with an instrumentation library
Date: Tue, 26 Mar 2013 08:59:43 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

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 <address@hidden>
> ---

> +++ b/instrument/cmdline.c
> @@ -0,0 +1,94 @@
> +/*
> + * Control dynamic trace instrumentation during program (de)initialization.
> + *
> + * Copyright (C) 2012 Lluís Vilanova <address@hidden>

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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]