From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2LhJ-0006WN-WE for qemu-devel@nongnu.org; Mon, 16 May 2016 12:48:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2LhG-00077y-E1 for qemu-devel@nongnu.org; Mon, 16 May 2016 12:48:49 -0400 Received: from mail-am1on0133.outbound.protection.outlook.com ([157.56.112.133]:30157 helo=emea01-am1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2LhG-00077k-0Y for qemu-devel@nongnu.org; Mon, 16 May 2016 12:48:46 -0400 References: <1463227273-27523-1-git-send-email-den@openvz.org> <1463227273-27523-5-git-send-email-den@openvz.org> <5739F61C.4050109@redhat.com> From: "Denis V. Lunev" Message-ID: <5739F9E8.7050609@openvz.org> Date: Mon, 16 May 2016 19:48:40 +0300 MIME-Version: 1.0 In-Reply-To: <5739F61C.4050109@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/6] qcow2: add tracepoints for qcow2_co_write_zeroes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: Kevin Wolf On 05/16/2016 07:32 PM, Eric Blake wrote: > On 05/14/2016 06:01 AM, Denis V. Lunev wrote: >> Signed-off-by: Denis V. Lunev >> CC: Kevin Wolf >> --- >> block/qcow2.c | 5 +++++ >> trace-events | 2 ++ >> 2 files changed, 7 insertions(+) >> >> diff --git a/block/qcow2.c b/block/qcow2.c >> index 9a54bbd..97bf870 100644 >> --- a/block/qcow2.c >> +++ b/block/qcow2.c >> @@ -2435,6 +2435,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); >> + > Can we trace these by byte locations rather than by sector count? > Ultimately, I think we want to move write_zeroes to a byte-based > interface, even if we still assert internally that it is at least > sector-aligned. > we can, but this patches traces for qcow2_co_writev static coroutine_fn int qcow2_co_writev(BlockDriverState *bs, int64_t sector_num, int remaining_sectors, QEMUIOVector *qiov) { [...] trace_qcow2_writev_start_req(qemu_coroutine_self(), sector_num, remaining_sectors); Thus I'd better either stick to this implementation or change all tracepoints in QEMU code.