Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Juan Quintela committed May 18, 2023
1 parent 99319e2 commit 3db9c05
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion migration/migration-stats.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
3 changes: 3 additions & 0 deletions migration/trace-events
Expand Up @@ -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"
Expand Down

0 comments on commit 3db9c05

Please sign in to comment.