From patchwork Thu May 4 09:40:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 758476 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wJVYF3JM1z9rxm for ; Thu, 4 May 2017 19:46:57 +1000 (AEST) Received: from localhost ([::1]:40741 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6DLa-0004uG-Rv for incoming@patchwork.ozlabs.org; Thu, 04 May 2017 05:46:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6DGB-0008Qh-2h for qemu-devel@nongnu.org; Thu, 04 May 2017 05:41:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6DG9-0000tA-Nh for qemu-devel@nongnu.org; Thu, 04 May 2017 05:41:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57780) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6DG9-0000rn-GV for qemu-devel@nongnu.org; Thu, 04 May 2017 05:41:17 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 716A315D9 for ; Thu, 4 May 2017 09:41:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 716A315D9 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=quintela@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 716A315D9 Received: from secure.mitica (ovpn-116-25.ams2.redhat.com [10.36.116.25]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1ADF11715B; Thu, 4 May 2017 09:41:14 +0000 (UTC) From: Juan Quintela To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 11:40:53 +0200 Message-Id: <20170504094053.2329-11-quintela@redhat.com> In-Reply-To: <20170504094053.2329-1-quintela@redhat.com> References: <20170504094053.2329-1-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 04 May 2017 09:41:16 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 10/10] migration: Extra tracing 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: lvivier@redhat.com, dgilbert@redhat.com, peterx@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: "Dr. David Alan Gilbert" A couple more traces that would have made fixing that postcopy bug a bit easier. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c | 2 ++ migration/trace-events | 2 ++ 2 files changed, 4 insertions(+) diff --git a/migration/ram.c b/migration/ram.c index 4918c11..293d27c 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -788,6 +788,7 @@ static int ram_save_page(RAMState *rs, PageSearchStatus *pss, bool last_stage) ram_addr_t offset = pss->page << TARGET_PAGE_BITS; p = block->host + offset; + trace_ram_save_page(block->idstr, (uint64_t)offset, p); /* In doubt sent page as normal */ bytes_xmit = 0; @@ -2550,6 +2551,7 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id) ret = -EINVAL; break; } + trace_ram_load_loop(block->idstr, (uint64_t)addr, flags, host); } switch (flags & ~RAM_SAVE_FLAG_CONTINUE) { diff --git a/migration/trace-events b/migration/trace-events index b8f01a2..5b8ccf3 100644 --- a/migration/trace-events +++ b/migration/trace-events @@ -69,8 +69,10 @@ migration_bitmap_sync_start(void) "" migration_bitmap_sync_end(uint64_t dirty_pages) "dirty_pages %" PRIu64 migration_throttle(void) "" ram_discard_range(const char *rbname, uint64_t start, size_t len) "%s: start: %" PRIx64 " %zx" +ram_load_loop(const char *rbname, uint64_t addr, int flags, void *host) "%s: addr: %" PRIx64 " flags: %x host: %p" ram_load_postcopy_loop(uint64_t addr, int flags) "@%" PRIx64 " %x" ram_postcopy_send_discard_bitmap(void) "" +ram_save_page(const char *rbname, uint64_t offset, void *host) "%s: offset: %" PRIx64 " host: %p" ram_save_queue_pages(const char *rbname, size_t start, size_t len) "%s: start: %zx len: %zx" # migration/migration.c