From patchwork Thu Apr 7 14:49:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 90193 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B471FB6F44 for ; Fri, 8 Apr 2011 00:54:12 +1000 (EST) Received: from localhost ([127.0.0.1]:54751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7qaZ-0008BO-Ic for incoming@patchwork.ozlabs.org; Thu, 07 Apr 2011 10:53:39 -0400 Received: from [140.186.70.92] (port=35893 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7qUL-0005RE-Rb for qemu-devel@nongnu.org; Thu, 07 Apr 2011 10:47:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7qUK-0004pp-0c for qemu-devel@nongnu.org; Thu, 07 Apr 2011 10:47:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7qUJ-0004pF-IV for qemu-devel@nongnu.org; Thu, 07 Apr 2011 10:47:11 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p37El9lH023697 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 7 Apr 2011 10:47:09 -0400 Received: from dhcp-5-188.str.redhat.com (dhcp-5-175.str.redhat.com [10.32.5.175]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p37El4go008968; Thu, 7 Apr 2011 10:47:08 -0400 From: Kevin Wolf To: anthony@codemonkey.ws Date: Thu, 7 Apr 2011 16:49:12 +0200 Message-Id: <1302187764-16421-4-git-send-email-kwolf@redhat.com> In-Reply-To: <1302187764-16421-1-git-send-email-kwolf@redhat.com> References: <1302187764-16421-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 03/15] trace: Trace bdrv_set_locked() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Stefan Hajnoczi It can be handy to know when the guest locks/unlocks the CD-ROM tray. This trace event makes that possible. Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block.c | 2 ++ trace-events | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index c93ec6d..d8da3b0 100644 --- a/block.c +++ b/block.c @@ -2817,6 +2817,8 @@ void bdrv_set_locked(BlockDriverState *bs, int locked) { BlockDriver *drv = bs->drv; + trace_bdrv_set_locked(bs, locked); + bs->locked = locked; if (drv && drv->bdrv_set_locked) { drv->bdrv_set_locked(bs, locked); diff --git a/trace-events b/trace-events index 06efdb7..703b745 100644 --- a/trace-events +++ b/trace-events @@ -54,6 +54,7 @@ disable bdrv_aio_multiwrite_latefail(void *mcb, int i) "mcb %p i %d" disable bdrv_aio_flush(void *bs, void *opaque) "bs %p opaque %p" disable bdrv_aio_readv(void *bs, int64_t sector_num, int nb_sectors, void *opaque) "bs %p sector_num %"PRId64" nb_sectors %d opaque %p" disable bdrv_aio_writev(void *bs, int64_t sector_num, int nb_sectors, void *opaque) "bs %p sector_num %"PRId64" nb_sectors %d opaque %p" +disable bdrv_set_locked(void *bs, int locked) "bs %p locked %d" # hw/virtio-blk.c disable virtio_blk_req_complete(void *req, int status) "req %p status %d"