aboutsummaryrefslogtreecommitdiff
path: root/migration/migration-stats.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2023-05-15 21:57:00 +0200
committerJuan Quintela <quintela@redhat.com>2023-05-18 18:40:51 +0200
commit3db9c05a9006550da3a73600cec89bb995420325 (patch)
treec19d8a483f46a60b738c710d043f3b527a21baff /migration/migration-stats.c
parent99319e2dafaf2ad05412c8f119efcdf24a3baf04 (diff)
migration: Add a trace for migration_transferred_bytes
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>
Diffstat (limited to 'migration/migration-stats.c')
-rw-r--r--migration/migration-stats.c7
1 files changed, 6 insertions, 1 deletions
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;
}