From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ljg6A-0006SE-AV for qemu-devel@nongnu.org; Tue, 17 Mar 2009 16:41:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ljg64-0006PC-TN for qemu-devel@nongnu.org; Tue, 17 Mar 2009 16:41:17 -0400 Received: from [199.232.76.173] (port=57238 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ljg64-0006P3-BB for qemu-devel@nongnu.org; Tue, 17 Mar 2009 16:41:12 -0400 Received: from mx1.redhat.com ([66.187.233.31]:45035) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ljg63-0004JD-Uj for qemu-devel@nongnu.org; Tue, 17 Mar 2009 16:41:12 -0400 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n2HKfBMT020280 for ; Tue, 17 Mar 2009 16:41:11 -0400 From: Uri Lublin Date: Tue, 17 Mar 2009 22:40:45 +0200 Message-Id: <1237322452-11337-8-git-send-email-uril@redhat.com> In-Reply-To: <1237322452-11337-7-git-send-email-uril@redhat.com> References: <1237322452-11337-1-git-send-email-uril@redhat.com> <1237322452-11337-2-git-send-email-uril@redhat.com> <1237322452-11337-3-git-send-email-uril@redhat.com> <1237322452-11337-4-git-send-email-uril@redhat.com> <1237322452-11337-5-git-send-email-uril@redhat.com> <1237322452-11337-6-git-send-email-uril@redhat.com> <1237322452-11337-7-git-send-email-uril@redhat.com> Subject: [Qemu-devel] [PATCH 07/14] block: info blockstats: show highest_allocated if exists Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Uri Lublin Signed-off-by: Uri Lublin --- block.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/block.c b/block.c index bdf66a4..411514a 100644 --- a/block.c +++ b/block.c @@ -1093,6 +1093,7 @@ void bdrv_info(Monitor *mon) void bdrv_info_stats(Monitor *mon) { BlockDriverState *bs; + BlockDriverInfo bdi; for (bs = bdrv_first; bs != NULL; bs = bs->next) { monitor_printf(mon, "%s:" @@ -1100,10 +1101,17 @@ void bdrv_info_stats(Monitor *mon) " wr_bytes=%" PRIu64 " rd_operations=%" PRIu64 " wr_operations=%" PRIu64 - "\n", + , bs->device_name, bs->rd_bytes, bs->wr_bytes, bs->rd_ops, bs->wr_ops); + if (bdrv_get_info(bs, &bdi) == 0) { + if (bdi.highest_alloc) { + monitor_printf(mon, " high=%" PRIu64, + bdi.highest_alloc); + } + } + monitor_printf(mon, "\n"); } } -- 1.6.0.6