From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33434) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9gIw-0002he-0S for qemu-devel@nongnu.org; Fri, 30 Sep 2011 12:51:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9gIt-0002Bv-UR for qemu-devel@nongnu.org; Fri, 30 Sep 2011 12:51:17 -0400 Received: from mtagate3.uk.ibm.com ([194.196.100.163]:40784) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9gIt-0002BU-Ma for qemu-devel@nongnu.org; Fri, 30 Sep 2011 12:51:15 -0400 Received: from d06nrmr1707.portsmouth.uk.ibm.com (d06nrmr1707.portsmouth.uk.ibm.com [9.149.39.225]) by mtagate3.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p8UGpDHn015674 for ; Fri, 30 Sep 2011 16:51:13 GMT Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by d06nrmr1707.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p8UGpCu32072810 for ; Fri, 30 Sep 2011 17:51:13 +0100 Received: from d06av05.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p8UGpCHG006693 for ; Fri, 30 Sep 2011 10:51:12 -0600 From: Stefan Hajnoczi Date: Fri, 30 Sep 2011 17:51:01 +0100 Message-Id: <1317401463-7800-2-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1317401463-7800-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1317401463-7800-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 1/3] trace: trace bdrv_open_common() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi bdrv_open_common() is a useful point to trace since it reveals the filename and block driver for a given BlockDriverState. Signed-off-by: Stefan Hajnoczi --- block.c | 2 ++ trace-events | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index e3fe97f..1ae22d5 100644 --- a/block.c +++ b/block.c @@ -475,6 +475,8 @@ static int bdrv_open_common(BlockDriverState *bs, const char *filename, assert(drv != NULL); + trace_bdrv_open_common(bs, filename, flags, drv->format_name); + bs->file = NULL; bs->total_sectors = 0; bs->encrypted = 0; diff --git a/trace-events b/trace-events index a31d9aa..79ff5ea 100644 --- a/trace-events +++ b/trace-events @@ -56,6 +56,7 @@ virtio_console_chr_read(unsigned int port, int size) "port %u, size %d" virtio_console_chr_event(unsigned int port, int event) "port %u, event %d" # block.c +bdrv_open_common(void *bs, const char *filename, int flags, const char *format_name) "bs %p filename \"%s\" flags %#x format_name \"%s\"" multiwrite_cb(void *mcb, int ret) "mcb %p ret %d" bdrv_aio_multiwrite(void *mcb, int num_callbacks, int num_reqs) "mcb %p num_callbacks %d num_reqs %d" bdrv_aio_multiwrite_earlyfail(void *mcb) "mcb %p" -- 1.7.6.3