[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 12/21] migration: Add a trace for migration_transferred_bytes
From: |
Juan Quintela |
Subject: |
[PATCH 12/21] migration: Add a trace for migration_transferred_bytes |
Date: |
Mon, 8 May 2023 15:09:00 +0200 |
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/migration-stats.c | 8 ++++++--
migration/trace-events | 3 +++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/migration/migration-stats.c b/migration/migration-stats.c
index fba66c4577..46b2b0d06e 100644
--- a/migration/migration-stats.c
+++ b/migration/migration-stats.c
@@ -14,6 +14,7 @@
#include "qemu/stats64.h"
#include "qemu/timer.h"
#include "qemu-file.h"
+#include "trace.h"
#include "migration-stats.h"
MigrationAtomicStats mig_stats;
@@ -66,6 +67,9 @@ void migration_rate_limit_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 92161eeac5..4b6e802833 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.0
- [PATCH 05/21] qemu-file: Make rate_limit_used an uint64_t, (continued)
- [PATCH 05/21] qemu-file: Make rate_limit_used an uint64_t, Juan Quintela, 2023/05/08
- [PATCH 06/21] qemu-file: Remove total from qemu_file_total_transferred_*(), Juan Quintela, 2023/05/08
- [PATCH 08/21] migration: Move setup_time to mig_stats, Juan Quintela, 2023/05/08
- [PATCH 07/21] migration: Correct transferred bytes value, Juan Quintela, 2023/05/08
- [PATCH 12/21] migration: Add a trace for migration_transferred_bytes,
Juan Quintela <=
- [PATCH 13/21] migration: Use migration_transferred_bytes() to calculate rate_limit, Juan Quintela, 2023/05/08
- [PATCH 15/21] migration: Don't abuse qemu_file transferred for RDMA, Juan Quintela, 2023/05/08
- [PATCH 17/21] migration/rdma: Remove QEMUFile parameter when not used, Juan Quintela, 2023/05/08
- [PATCH 14/21] migration: We don't need the field rate_limit_used anymore, Juan Quintela, 2023/05/08
- [PATCH 16/21] migration/RDMA: It is accounting for zero/normal pages in two places, Juan Quintela, 2023/05/08
- [PATCH 19/21] migration: Remove unused qemu_file_credit_transfer(), Juan Quintela, 2023/05/08
- [PATCH 11/21] migration: Move migration_total_bytes() to migration-stats.c, Juan Quintela, 2023/05/08