From patchwork Thu May 26 03:48:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Blake X-Patchwork-Id: 9136555 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A8BD1607D3 for ; Thu, 26 May 2016 03:52:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95199279E2 for ; Thu, 26 May 2016 03:52:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 89D14282BB; Thu, 26 May 2016 03:52:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1077F279E2 for ; Thu, 26 May 2016 03:52:47 +0000 (UTC) Received: from localhost ([::1]:36263 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5mLm-00051x-62 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 25 May 2016 23:52:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5mID-0001zU-I4 for qemu-devel@nongnu.org; Wed, 25 May 2016 23:49:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5mIB-00043Z-7S for qemu-devel@nongnu.org; Wed, 25 May 2016 23:49:04 -0400 Received: from resqmta-po-04v.sys.comcast.net ([2001:558:fe16:19:96:114:154:163]:40458) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5mIB-00043A-38 for qemu-devel@nongnu.org; Wed, 25 May 2016 23:49:03 -0400 Received: from resomta-po-18v.sys.comcast.net ([96.114.154.242]) by comcast with SMTP id 5mI9bpgTPIY3M5mIAbSP7V; Thu, 26 May 2016 03:49:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1464234542; bh=3TDqCpHjlfv3olyP96mRENXTeVT0xOtT0z9g7UMZ4Lk=; h=Received:Received:From:To:Subject:Date:Message-Id; b=cftXvwxm3hec1Jom/xyxaMAi1QmOImpZK5b3fUbAr4A+xfpCztzK7ZyLF7RD2gk3c 8//lJ2Wo26m1sz+pw1EBzXdhtLYqpMDWhV2FLyFNCgGpBRH4K5ag//JaJqnOqZTUNo N41sh5NxDanGFVWcRPrjZwmB0v2i6oqMjol6Q6TH4+wLQXwhaVE80htoCBQ4OF0wcL zPflsFzYryGq4aCMIS5MNgI1zygn+SLJEEJ6ewaCXafTE589LwDkIkZE1j/wIV/SlN tBD3El0enqd6Cyxfe9PqogeG5fFz9ddlsbKrnM7bbsNLmsKRw8IaQKH+HwHk9VX2sd aQYIV//FFltBg== Received: from red.localdomain ([24.10.254.122]) by resomta-po-18v.sys.comcast.net with comcast id yrop1s00E2fD5rL01rp2lU; Thu, 26 May 2016 03:49:02 +0000 From: Eric Blake To: qemu-devel@nongnu.org Date: Wed, 25 May 2016 21:48:47 -0600 Message-Id: <1464234529-13018-4-git-send-email-eblake@redhat.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1464234529-13018-1-git-send-email-eblake@redhat.com> References: <1464234529-13018-1-git-send-email-eblake@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:558:fe16:19:96:114:154:163 Subject: [Qemu-devel] [PATCH v3 3/5] qcow2: add tracepoints for qcow2_co_write_zeroes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, den@openvz.org, qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: "Denis V. Lunev" This patch follows guidelines of all other tracepoints in qcow2, like ones in qcow2_co_writev. I think that they should dump values in the same quantities or be changed all together. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Kevin Wolf Message-Id: <1463476543-3087-4-git-send-email-den@openvz.org> [eblake: typo fix in commit message] Signed-off-by: Eric Blake --- block/qcow2.c | 5 +++++ trace-events | 2 ++ 2 files changed, 7 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index 2f73201..105fd5e 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -2437,6 +2437,9 @@ static coroutine_fn int qcow2_co_write_zeroes(BlockDriverState *bs, int head = sector_num % s->cluster_sectors; int tail = (sector_num + nb_sectors) % s->cluster_sectors; + trace_qcow2_write_zeroes_start_req(qemu_coroutine_self(), sector_num, + nb_sectors); + if (head != 0 || tail != 0) { int64_t cl_start = sector_num - head; @@ -2459,6 +2462,8 @@ static coroutine_fn int qcow2_co_write_zeroes(BlockDriverState *bs, qemu_co_mutex_lock(&s->lock); } + trace_qcow2_write_zeroes(qemu_coroutine_self(), sector_num, nb_sectors); + /* Whatever is left can use real zero clusters */ ret = qcow2_zero_clusters(bs, sector_num << BDRV_SECTOR_BITS, nb_sectors); qemu_co_mutex_unlock(&s->lock); diff --git a/trace-events b/trace-events index 4450d8f..46726cc 100644 --- a/trace-events +++ b/trace-events @@ -612,6 +612,8 @@ qcow2_writev_done_req(void *co, int ret) "co %p ret %d" qcow2_writev_start_part(void *co) "co %p" qcow2_writev_done_part(void *co, int cur_nr_sectors) "co %p cur_nr_sectors %d" qcow2_writev_data(void *co, uint64_t offset) "co %p offset %" PRIx64 +qcow2_write_zeroes_start_req(void *co, int64_t sector, int nb_sectors) "co %p sector %" PRIx64 " nb_sectors %d" +qcow2_write_zeroes(void *co, int64_t sector, int nb_sectors) "co %p sector %" PRIx64 " nb_sectors %d" # block/qcow2-cluster.c qcow2_alloc_clusters_offset(void *co, uint64_t offset, int num) "co %p offset %" PRIx64 " num %d"