[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/12] migration: Add a trace for migration_transferred_bytes
From: |
Juan Quintela |
Subject: |
[PULL 08/12] migration: Add a trace for migration_transferred_bytes |
Date: |
Thu, 18 May 2023 19:13:00 +0200 |
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20230515195709.63843-8-quintela@redhat.com>
---
migration/migration-stats.c | 7 ++++++-
migration/trace-events | 3 +++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/migration/migration-stats.c b/migration/migration-stats.c
index 39e98d6fa9..feec7d7369 100644
--- a/migration/migration-stats.c
+++ b/migration/migration-stats.c
@@ -13,6 +13,7 @@
#include "qemu/osdep.h"
#include "qemu/stats64.h"
#include "qemu-file.h"
+#include "trace.h"
#include "migration-stats.h"
MigrationAtomicStats mig_stats;
@@ -62,5 +63,9 @@ void migration_rate_account(uint64_t len)
uint64_t migration_transferred_bytes(QEMUFile *f)
{
- return qemu_file_transferred(f) + stat64_get(&mig_stats.multifd_bytes);
+ uint64_t multifd = stat64_get(&mig_stats.multifd_bytes);
+ uint64_t qemu_file = qemu_file_transferred(f);
+
+ trace_migration_transferred_bytes(qemu_file, multifd);
+ return qemu_file + multifd;
}
diff --git a/migration/trace-events b/migration/trace-events
index f39818c329..cdaef7a1ea 100644
--- a/migration/trace-events
+++ b/migration/trace-events
@@ -186,6 +186,9 @@ process_incoming_migration_co_end(int ret, int ps) "ret=%d
postcopy-state=%d"
process_incoming_migration_co_postcopy_end_main(void) ""
postcopy_preempt_enabled(bool value) "%d"
+# migration-stats
+migration_transferred_bytes(uint64_t qemu_file, uint64_t multifd) "qemu_file
%" PRIu64 " multifd %" PRIu64
+
# channel.c
migration_set_incoming_channel(void *ioc, const char *ioctype) "ioc=%p
ioctype=%s"
migration_set_outgoing_channel(void *ioc, const char *ioctype, const char
*hostname, void *err) "ioc=%p ioctype=%s hostname=%s err=%p"
--
2.40.1
- [PULL 00/12] Migration 20230518 patches, Juan Quintela, 2023/05/18
- [PULL 01/12] configure: add --disable-colo-proxy option, Juan Quintela, 2023/05/18
- [PULL 02/12] migration: split migration_incoming_co, Juan Quintela, 2023/05/18
- [PULL 03/12] migration: process_incoming_migration_co(): move colo part to colo, Juan Quintela, 2023/05/18
- [PULL 04/12] migration: Don't use INT64_MAX for unlimited rate, Juan Quintela, 2023/05/18
- [PULL 06/12] migration: Move rate_limit_max and rate_limit_used to migration_stats, Juan Quintela, 2023/05/18
- [PULL 05/12] qemu-file: Account for rate_limit usage on qemu_fflush(), Juan Quintela, 2023/05/18
- [PULL 07/12] migration: Move migration_total_bytes() to migration-stats.c, Juan Quintela, 2023/05/18
- [PULL 08/12] migration: Add a trace for migration_transferred_bytes,
Juan Quintela <=
- [PULL 09/12] migration: Use migration_transferred_bytes() to calculate rate_limit, Juan Quintela, 2023/05/18
- [PULL 11/12] migration/multifd: Compute transferred bytes correctly, Juan Quintela, 2023/05/18
- [PULL 10/12] migration: We don't need the field rate_limit_used anymore, Juan Quintela, 2023/05/18
- [PULL 12/12] migration: Fix duplicated included in meson.build, Juan Quintela, 2023/05/18