qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/3] pseries: Add DPRINTF macros to spapr pci co


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH 3/3] pseries: Add DPRINTF macros to spapr pci code
Date: Wed, 4 Apr 2012 19:18:34 +0000

On Mon, Apr 2, 2012 at 04:17, David Gibson <address@hidden> wrote:
> From: Alexey Kardashevskiy <address@hidden>
>
> This adds DPRINTF() macros with the usual conventions to the spapr_pci
> code.

Please use tracepoints instead of printf statements. Tracing is more
flexible, more efficient and does not suffer from bitrot.

> Cc: Michael S. Tsirkin <address@hidden>
>
> Signed-off-by: Alexey Kardashevskiy <address@hidden>
> Signed-off-by: David Gibson <address@hidden>
> ---
>  hw/spapr_pci.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/hw/spapr_pci.c b/hw/spapr_pci.c
> index b8a0313..61a53d5 100644
> --- a/hw/spapr_pci.c
> +++ b/hw/spapr_pci.c
> @@ -32,6 +32,14 @@
>
>  #include "hw/pci_internals.h"
>
> +/*#define DEBUG_SPAPR_PCI*/
> +
> +#ifdef DEBUG_SPAPR_PCI
> +# define DPRINTF(format, ...) fprintf(stderr, "QEMU: " format, ## 
> __VA_ARGS__)
> +#else
> +# define DPRINTF(format, ...) do { } while (0)
> +#endif
> +
>  static PCIDevice *find_dev(sPAPREnvironment *spapr,
>                            uint64_t buid, uint32_t config_addr)
>  {
> --
> 1.7.9.1
>
>



reply via email to

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