From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, "Fam Zheng" <fam@euphon.net>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Juan Quintela" <quintela@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
qemu-block@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH] migration/block: Convert remaining DPRINTF() debug macro to trace events
Date: Wed, 15 Feb 2023 16:35:17 +0100 [thread overview]
Message-ID: <20230215153517.30732-1-philmd@linaro.org> (raw)
Finish the conversion from commit fe80c0241d
("migration: using trace_ to replace DPRINTF").
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
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
--
2.38.1
next reply other threads:[~2023-02-15 15:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-15 15:35 Philippe Mathieu-Daudé [this message]
2023-02-15 16:50 ` [PATCH] migration/block: Convert remaining DPRINTF() debug macro to trace events Juan Quintela
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230215153517.30732-1-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=dgilbert@redhat.com \
--cc=fam@euphon.net \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=quintela@redhat.com \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).