From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beUNX-0006UX-Uv for qemu-devel@nongnu.org; Mon, 29 Aug 2016 17:46:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1beUNU-0002n5-SQ for qemu-devel@nongnu.org; Mon, 29 Aug 2016 17:46:03 -0400 From: Pavel Butsykin Date: Mon, 29 Aug 2016 20:10:03 +0300 Message-ID: <20160829171021.4902-5-pbutsykin@virtuozzo.com> In-Reply-To: <20160829171021.4902-1-pbutsykin@virtuozzo.com> References: <20160829171021.4902-1-pbutsykin@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH RFC v2 04/22] block/pcache: add pcache debug build List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org, qemu-devel@nongnu.org Cc: kwolf@redhat.com, mreitz@redhat.com, stefanha@redhat.com, den@openvz.org, jsnow@redhat.com, eblake@redhat.com, famz@redhat.com Signed-off-by: Pavel Butsykin --- block/pcache.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/block/pcache.c b/block/pcache.c index 74a4bc4..7f221d6 100644 --- a/block/pcache.c +++ b/block/pcache.c @@ -28,6 +28,15 @@ #include "qapi/error.h" #include "qapi/qmp/qstring.h" +#define PCACHE_DEBUG + +#ifdef PCACHE_DEBUG +#define DPRINTF(fmt, ...) \ + printf("%s:%s:%d "fmt, __FILE__, __func__, __LINE__, ## __VA_ARGS__) +#else +#define DPRINTF(fmt, ...) do { } while (0) +#endif + typedef struct PrefCacheAIOCB { BlockAIOCB common; -- 2.8.3