[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 07/16] migration: Add a trace for migration_transferred_by
From: |
Leonardo Brás |
Subject: |
Re: [PATCH v2 07/16] migration: Add a trace for migration_transferred_bytes |
Date: |
Thu, 25 May 2023 00:18:37 -0300 |
User-agent: |
Evolution 3.48.1 |
On Mon, 2023-05-15 at 21:57 +0200, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> Reviewed-by: Cédric Le Goater <clg@kaod.org>
> ---
> 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 9bd97caa23..301392d208 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;
> @@ -69,6 +70,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"
LGTM
Reviewed-by: Leonardo Bras <leobras@redhat.com>
[PATCH v2 09/16] migration: We don't need the field rate_limit_used anymore, Juan Quintela, 2023/05/15
[PATCH v2 10/16] migration: Don't abuse qemu_file transferred for RDMA, Juan Quintela, 2023/05/15