[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 1/3] virtio-bus : Introduce VirtioBus.
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [RFC PATCH 1/3] virtio-bus : Introduce VirtioBus. |
Date: |
Wed, 21 Nov 2012 15:13:01 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121025 Thunderbird/16.0.2 |
Am 21.11.2012 15:05, schrieb KONRAD Frédéric:
> On 21/11/2012 14:04, Andreas Färber wrote:
>> Am 16.11.2012 16:35, schrieb address@hidden:
>>> +#define DEBUG_VIRTIO_BUS
>>> +
>>> +#ifdef DEBUG_VIRTIO_BUS
>>> +
>>> +#define DPRINTF(fmt, ...) \
>>> +do { printf("virtio_bus: " fmt , ## __VA_ARGS__); } while (0)
>>> +#else
>>> +#define DPRINTF(fmt, ...) do {} while (0)
>>> +#endif
>> We recently had a discussion about bitrotting DPRINTF() statements where
>> I suggested to use if (0) instead of a no-op macro like this that
>> doesn't reference fmt and the varargs.
> I don't understand what you suggested, can you point me to an example ?
I don't have a link at hand, maybe Evgeny does. It was along the lines of:
#define DEBUG_VIRTIO_BUS 0
#define DPRINTF(fmt, ...) if (DEBUG_VIRTIO_BUS) { \
printf("virtio_bus: " fmt , ## __VA_ARGS__); \
}
The officially preferred alternative is to use tracepoints. ;)
Cheers,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-devel] [RFC PATCH 1/3] virtio-bus : Introduce VirtioBus., (continued)
- [Qemu-devel] [RFC PATCH 1/3] virtio-bus : Introduce VirtioBus., fred . konrad, 2012/11/16
- Re: [Qemu-devel] [RFC PATCH 1/3] virtio-bus : Introduce VirtioBus., Peter Maydell, 2012/11/19
- Re: [Qemu-devel] [RFC PATCH 1/3] virtio-bus : Introduce VirtioBus., Cornelia Huck, 2012/11/20
- Re: [Qemu-devel] [RFC PATCH 1/3] virtio-bus : Introduce VirtioBus., KONRAD Frédéric, 2012/11/20
- Re: [Qemu-devel] [RFC PATCH 1/3] virtio-bus : Introduce VirtioBus., Cornelia Huck, 2012/11/20
- Re: [Qemu-devel] [RFC PATCH 1/3] virtio-bus : Introduce VirtioBus., KONRAD Frédéric, 2012/11/20
- Re: [Qemu-devel] [RFC PATCH 1/3] virtio-bus : Introduce VirtioBus., Cornelia Huck, 2012/11/20
- Re: [Qemu-devel] [RFC PATCH 1/3] virtio-bus : Introduce VirtioBus., KONRAD Frédéric, 2012/11/21
Re: [Qemu-devel] [RFC PATCH 1/3] virtio-bus : Introduce VirtioBus., Andreas Färber, 2012/11/21
[Qemu-devel] [RFC PATCH 2/3] virtio-pci : Add a virtio-bus interface, fred . konrad, 2012/11/16
[Qemu-devel] [RFC PATCH 3/3] virtio-blk : add the virtio-blk device., fred . konrad, 2012/11/16