All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuan Zheng <zhengchuan@huawei.com>
To: <quintela@redhat.com>, <eblake@redhat.com>, <dgilbert@redhat.com>,
	<berrange@redhat.com>
Cc: zhengchuan@huawei.com, zhang.zhanghailiang@huawei.com,
	yuxiating@huawei.com, qemu-devel@nongnu.org,
	xiexiangyou@huawei.com, alex.chen@huawei.com,
	jinyan12@huawei.com
Subject: [PATCH v3 6/6] migration/tls: add trace points for multifd-tls
Date: Sun, 13 Sep 2020 10:47:36 +0800	[thread overview]
Message-ID: <1599965256-72150-7-git-send-email-zhengchuan@huawei.com> (raw)
In-Reply-To: <1599965256-72150-1-git-send-email-zhengchuan@huawei.com>

add trace points for multifd-tls for debug.

Signed-off-by: Chuan Zheng <zhengchuan@huawei.com>
Signed-off-by: Yan Jin <jinyan12@huawei.com>
---
 migration/multifd.c    | 10 +++++++++-
 migration/trace-events |  4 ++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/migration/multifd.c b/migration/multifd.c
index 8aea4e0..0760502 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -732,7 +732,11 @@ static void multifd_tls_outgoing_handshake(QIOTask *task,
     QIOChannel *ioc = QIO_CHANNEL(qio_task_get_source(task));
     Error *err = NULL;
 
-    qio_task_propagate_error(task, &err);
+    if (qio_task_propagate_error(task, &err)) {
+        trace_multifd_tls_outgoing_handshake_error(ioc, error_get_pretty(err));
+    } else {
+        trace_multifd_tls_outgoing_handshake_complete(ioc);
+    }
     multifd_channel_connect(p, ioc, err);
 }
 
@@ -749,6 +753,7 @@ static void multifd_tls_channel_connect(MultiFDSendParams *p,
         return;
     }
 
+    trace_multifd_tls_outgoing_handshake_start(ioc, tioc, hostname);
     qio_channel_set_name(QIO_CHANNEL(tioc), "multifd-tls-outgoing");
     qio_channel_tls_handshake(tioc,
                               multifd_tls_outgoing_handshake,
@@ -764,6 +769,9 @@ static bool multifd_channel_connect(MultiFDSendParams *p,
 {
     MigrationState *s = p->s;
 
+    trace_multifd_set_outgoing_channel(
+        ioc, object_get_typename(OBJECT(ioc)), s->hostname, error);
+
     if (!error) {
         if (s->parameters.tls_creds &&
             *s->parameters.tls_creds &&
diff --git a/migration/trace-events b/migration/trace-events
index 7ba2fa6..faf52a8 100644
--- a/migration/trace-events
+++ b/migration/trace-events
@@ -129,6 +129,10 @@ multifd_send_sync_main_wait(uint8_t id) "channel %d"
 multifd_send_terminate_threads(bool error) "error %d"
 multifd_send_thread_end(uint8_t id, uint64_t packets, uint64_t pages) "channel %d packets %" PRIu64 " pages %"  PRIu64
 multifd_send_thread_start(uint8_t id) "%d"
+multifd_tls_outgoing_handshake_start(void *ioc, void *tioc, const char *hostname) "ioc=%p tioc=%p hostname=%s"
+multifd_tls_outgoing_handshake_error(void *ioc, const char *err) "ioc=%p err=%s"
+multifd_tls_outgoing_handshake_complete(void *ioc, void) "ioc=%p"
+multifd_set_outgoing_channel(void *ioc, const char *ioctype, const char *hostname, void *err)  "ioc=%p ioctype=%s hostname=%s err=%p"
 
 # migration.c
 await_return_path_close_on_source_close(void) ""
-- 
1.8.3.1



  parent reply	other threads:[~2020-09-13  2:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-13  2:47 [PATCH v3 0/6] *** Add Multifd support for TLS migration *** Chuan Zheng
2020-09-13  2:47 ` [PATCH v3 1/6] migration/tls: save hostname into MigrationState Chuan Zheng
2020-09-14  9:00   ` Daniel P. Berrangé
2020-09-14 11:22     ` Zheng Chuan
2020-09-13  2:47 ` [PATCH v3 2/6] migration/tls: extract migration_tls_client_create for common-use Chuan Zheng
2020-09-13  2:47 ` [PATCH v3 3/6] migration/tls: add MigrationState and tls_hostname into MultiFDSendParams Chuan Zheng
2020-09-14  9:02   ` Daniel P. Berrangé
2020-09-14  9:20     ` Zheng Chuan
2020-09-14  9:26       ` Daniel P. Berrangé
2020-09-14  9:36         ` Zheng Chuan
2020-09-13  2:47 ` [PATCH v3 4/6] migration/tls: extract cleanup function for common-use Chuan Zheng
2020-09-13  2:47 ` [PATCH v3 5/6] migration/tls: add support for multifd tls-handshake Chuan Zheng
2020-09-13  2:47 ` Chuan Zheng [this message]
2020-09-14  8:55   ` [PATCH v3 6/6] migration/tls: add trace points for multifd-tls Daniel P. Berrangé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1599965256-72150-7-git-send-email-zhengchuan@huawei.com \
    --to=zhengchuan@huawei.com \
    --cc=alex.chen@huawei.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=jinyan12@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=xiexiangyou@huawei.com \
    --cc=yuxiating@huawei.com \
    --cc=zhang.zhanghailiang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.