From patchwork Wed Feb 15 20:05:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 653749 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp543249wrr; Wed, 15 Feb 2023 12:07:22 -0800 (PST) X-Google-Smtp-Source: AK7set884v6KC1KNnDGgjaq0iMGvNSPDdeF+BgC5a6SGNcYauhYsMp0D4xAAYUekBw253U7QVg2B X-Received: by 2002:a05:622a:608:b0:3b9:beca:8d79 with SMTP id z8-20020a05622a060800b003b9beca8d79mr5875708qta.12.1676491642500; Wed, 15 Feb 2023 12:07:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676491642; cv=none; d=google.com; s=arc-20160816; b=YDrj39wOR7jp55g5sL3HHXhk1Lchy85tlmzf8QZGEphBGOQPL0VLlStl8Nk8dvzUf3 Dz2E6PNwOhYwiYYTqXL1bl/N1/wflfieJ587FSjMwdukHiCrB23Nqfs1u7P2OyCOLunP /QrPnxEA28seQdMZGHVuF6YLYg7jjMqV/N3s3CLu0TflR8GRTas93K8dBNynwYpERBKF OuySMvYQYEmEfIp0aZ5Thk6qnfkYV3Wyrv97IagYZbJmWmu0jwwoTbCIM4rZJrdjji3i nvdxRFtBvPFi5vLWCd8aY2cp9Nmnp3OE7ms+2ZVt3EwCF/L1nerBQuALMm1Ra5/aJChO hKOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oYWILZNDRqRKAPG1wFGutXoZk8C18/1z3YfLEmfdUf8=; b=Y7/mdaXtPfFHoLayLS+tsNscMAAzZVONlE6/cPxtvlEN7OagVVJEjJ8T3GOdpuaofr BGkm5gWKQbm1P4GC/Nz6RySub1gv1s9Zl2X9eHfxzjCEKaC/Q5VWCpa57j89+/WLGb77 dSLC4d1TtCNpF2ne64bF3C1EA9p44TFriPds4swOTMjUnb9h9xJEP0VfqthPns+63dcF UEUrvZbQJ6jtRjO/whGZES4QTI7+NJEmY/PiyAfrMQS6upnDsinz2sS7RM/eCVpJlPqX G/okMZk1Xy10oQcAsmszb6aYsDyKzbcllfXg1cSGx3iCrWrLM1vPqr1d88gVY/egs6k3 Q10A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ah0DD7Nq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z10-20020ac87f8a000000b003b852fc2c43si14308789qtj.434.2023.02.15.12.07.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Feb 2023 12:07:22 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ah0DD7Nq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSO2h-0003Pl-PF; Wed, 15 Feb 2023 15:06:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSO2g-0003Mb-A7 for qemu-devel@nongnu.org; Wed, 15 Feb 2023 15:06:14 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSO2e-0006bD-Dr for qemu-devel@nongnu.org; Wed, 15 Feb 2023 15:06:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676491571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oYWILZNDRqRKAPG1wFGutXoZk8C18/1z3YfLEmfdUf8=; b=ah0DD7NqDb/k69dicJFg0OOZm8YxWLoJbbYu4AYefaxfGNgIrA3eXdM9YL244VGg+UVGvH xd1GsaRNyfYAu0ID2bMZyque7s86mx3C9UKBOe1V9ErHQKpVoRwaJIfAdOjI2FmvpLn5Cn xzEdevutlIz3dpNYfxjmV3spCAq0a2o= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-510-7Kmbm_9hOQuBVXrSHfozIw-1; Wed, 15 Feb 2023 15:06:06 -0500 X-MC-Unique: 7Kmbm_9hOQuBVXrSHfozIw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EE0FD1C08976; Wed, 15 Feb 2023 20:06:05 +0000 (UTC) Received: from secure.mitica (unknown [10.39.192.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id 77211C15BAD; Wed, 15 Feb 2023 20:06:02 +0000 (UTC) From: Juan Quintela To: qemu-devel@nongnu.org Cc: Eric Blake , qemu-s390x@nongnu.org, Juan Quintela , Thomas Huth , Halil Pasic , "Dr. David Alan Gilbert" , Vladimir Sementsov-Ogievskiy , Alex Williamson , Ilya Leoshkevich , qemu-block@nongnu.org, Stefan Hajnoczi , Fam Zheng , David Hildenbrand , John Snow , Christian Borntraeger , Richard Henderson , Eric Farman , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 2/5] migration/block: Convert remaining DPRINTF() debug macro to trace events Date: Wed, 15 Feb 2023 21:05:51 +0100 Message-Id: <20230215200554.1365-3-quintela@redhat.com> In-Reply-To: <20230215200554.1365-1-quintela@redhat.com> References: <20230215200554.1365-1-quintela@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 Received-SPF: pass client-ip=170.10.133.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Finish the conversion from commit fe80c0241d ("migration: using trace_ to replace DPRINTF"). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/block.c | 12 +----------- migration/trace-events | 1 + 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/migration/block.c b/migration/block.c index 29f69025af..b5ce506d01 100644 --- a/migration/block.c +++ b/migration/block.c @@ -42,16 +42,6 @@ #define MAX_IO_BUFFERS 512 #define MAX_PARALLEL_IO 16 -/* #define DEBUG_BLK_MIGRATION */ - -#ifdef DEBUG_BLK_MIGRATION -#define DPRINTF(fmt, ...) \ - do { printf("blk_migration: " fmt, ## __VA_ARGS__); } while (0) -#else -#define DPRINTF(fmt, ...) \ - do { } while (0) -#endif - typedef struct BlkMigDevState { /* Written during setup phase. Can be read without a lock. */ BlockBackend *blk; @@ -502,7 +492,7 @@ static int blk_mig_save_bulked_block(QEMUFile *f) block_mig_state.prev_progress = progress; qemu_put_be64(f, (progress << BDRV_SECTOR_BITS) | BLK_MIG_FLAG_PROGRESS); - DPRINTF("Completed %d %%\r", progress); + trace_migration_block_progression(progress); } return ret; diff --git a/migration/trace-events b/migration/trace-events index 67b65a70ff..b20e1271bc 100644 --- a/migration/trace-events +++ b/migration/trace-events @@ -357,6 +357,7 @@ migration_block_flush_blks(const char *action, int submitted, int read_done, int migration_block_save(const char *mig_stage, int submitted, int transferred) "Enter save live %s submitted %d transferred %d" migration_block_save_complete(void) "Block migration completed" migration_block_state_pending(uint64_t pending) "Enter save live pending %" PRIu64 +migration_block_progression(unsigned percent) "Completed %u%%" # page_cache.c migration_pagecache_init(int64_t max_num_items) "Setting cache buckets to %" PRId64