[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 14/22] net: add trace_vhost_user_event
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PATCH v4 14/22] net: add trace_vhost_user_event |
Date: |
Sat, 19 Sep 2015 12:12:05 +0200 |
From: Marc-André Lureau <address@hidden>
Replace error_report() and use tracing instead. It's not an error to get
a connection or a disconnection, so silence this and trace it instead.
Signed-off-by: Marc-André Lureau <address@hidden>
---
net/vhost-user.c | 5 +++--
trace-events | 4 ++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/net/vhost-user.c b/net/vhost-user.c
index 93dcecd..bbcd9ff 100644
--- a/net/vhost-user.c
+++ b/net/vhost-user.c
@@ -14,6 +14,7 @@
#include "sysemu/char.h"
#include "qemu/config-file.h"
#include "qemu/error-report.h"
+#include "trace.h"
typedef struct VhostUserState {
NetClientState nc;
@@ -116,16 +117,16 @@ static void net_vhost_user_event(void *opaque, int event)
{
VhostUserState *s = opaque;
+ trace_vhost_user_event(s->chr->label, event);
+
switch (event) {
case CHR_EVENT_OPENED:
vhost_user_start(s);
net_vhost_link_down(s, false);
- error_report("chardev \"%s\" went up", s->chr->label);
break;
case CHR_EVENT_CLOSED:
net_vhost_link_down(s, true);
vhost_user_stop(s);
- error_report("chardev \"%s\" went down", s->chr->label);
break;
}
}
diff --git a/trace-events b/trace-events
index 88a2f14..1c4d61f 100644
--- a/trace-events
+++ b/trace-events
@@ -1685,3 +1685,7 @@ qcrypto_tls_creds_x509_load_cert_list(void *creds, const
char *file) "TLS creds
# crypto/tlssession.c
qcrypto_tls_session_new(void *session, void *creds, const char *hostname,
const char *aclname, int endpoint) "TLS session new session=%p creds=%p
hostname=%s aclname=%s endpoint=%d"
+
+# net/vhost-user.c
+vhost_user_event(const char *chr, int event) "chr: %s got event: %d"
+
--
2.4.3
- [Qemu-devel] [PATCH v4 04/22] configure: probe for memfd, (continued)
- [Qemu-devel] [PATCH v4 04/22] configure: probe for memfd, marcandre . lureau, 2015/09/19
- [Qemu-devel] [PATCH v4 05/22] util: add linux-only memfd fallback, marcandre . lureau, 2015/09/19
- [Qemu-devel] [PATCH v4 06/22] util: add memfd helpers, marcandre . lureau, 2015/09/19
- [Qemu-devel] [PATCH v4 07/22] vhost: alloc shareable log, marcandre . lureau, 2015/09/19
- [Qemu-devel] [PATCH v4 08/22] vhost: document log resizing, marcandre . lureau, 2015/09/19
- [Qemu-devel] [PATCH v4 09/22] vhost: use a function for each call, marcandre . lureau, 2015/09/19
- [Qemu-devel] [PATCH v4 10/22] vhost-user: remove vhost_user_request_translate(), marcandre . lureau, 2015/09/19
- [Qemu-devel] [PATCH v4 11/22] vhost-user: send log shm fd along with log_base, marcandre . lureau, 2015/09/19
- [Qemu-devel] [PATCH v4 12/22] vhost: only use shared log if in use by backend, marcandre . lureau, 2015/09/19
- [Qemu-devel] [PATCH v4 13/22] vhost-user: document migration log, marcandre . lureau, 2015/09/19
- [Qemu-devel] [PATCH v4 14/22] net: add trace_vhost_user_event,
marcandre . lureau <=
- [Qemu-devel] [PATCH v4 15/22] vhost user: add support of live migration, marcandre . lureau, 2015/09/19
- [Qemu-devel] [PATCH v4 16/22] vhost user: add rarp sending after live migration for legacy guest, marcandre . lureau, 2015/09/19
- [Qemu-devel] [PATCH v4 17/22] vhost-user-test: move wait_for_fds() out, marcandre . lureau, 2015/09/19
- [Qemu-devel] [PATCH v4 18/22] vhost-user-test: remove useless static check, marcandre . lureau, 2015/09/19
- [Qemu-devel] [PATCH v4 20/22] vhost-user-test: learn to tweak various qemu arguments, marcandre . lureau, 2015/09/19
- [Qemu-devel] [PATCH v4 19/22] vhost-user-test: wrap server in TestServer struct, marcandre . lureau, 2015/09/19
- [Qemu-devel] [PATCH v4 21/22] vhost-user-test: add live-migration test, marcandre . lureau, 2015/09/19
- [Qemu-devel] [PATCH v4 22/22] vhost-user-test: check ownership during migration, marcandre . lureau, 2015/09/19