[systemd-devel] [RFC 2/8] (debug) add a debug message and others

AKASHI Takahiro takahiro.akashi at linaro.org
Wed Jun 25 02:13:31 PDT 2014


lib_dump and lib_verbose variables are used only in my benchmark programs
for additional debug messages. You can ignore them for performance
evaluation.

Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
---
 test/kdbus-util.c |    4 ++++
 test/kdbus-util.h |    3 +++
 2 files changed, 7 insertions(+)

diff --git a/test/kdbus-util.c b/test/kdbus-util.c
index 5316263..6c2c5db 100644
--- a/test/kdbus-util.c
+++ b/test/kdbus-util.c
@@ -26,6 +26,9 @@
 #include "kdbus-util.h"
 #include "kdbus-enum.h"
 
+int lib_dump = 0;
+int lib_verbose = 0;
+
 #define POOL_SIZE (16 * 1024LU * 1024LU)
 static struct conn *
 __kdbus_hello(const char *path, uint64_t flags,
@@ -320,6 +323,7 @@ void msg_dump(const struct conn *conn, const struct kdbus_msg *msg)
 	else
 		cookie_reply = msg->cookie_reply;
 
+	printf("MESSAGE: from %lld, to %lld\n", msg->src_id, msg->dst_id);
 	printf("MESSAGE: %s (%llu bytes) flags=0x%08llx, %s → %s, cookie=%llu, timeout=%llu cookie_reply=%llu priority=%lli\n",
 		enum_PAYLOAD(msg->payload_type), (unsigned long long)msg->size,
 		(unsigned long long)msg->flags,
diff --git a/test/kdbus-util.h b/test/kdbus-util.h
index fde3f77..acdc34f 100644
--- a/test/kdbus-util.h
+++ b/test/kdbus-util.h
@@ -36,6 +36,9 @@ struct conn {
 	size_t size;
 };
 
+extern int lib_dump;
+extern int lib_verbose;
+
 int name_list(struct conn *conn, uint64_t flags);
 int name_release(struct conn *conn, const char *name);
 int name_acquire(struct conn *conn, const char *name, uint64_t flags);
-- 
1.7.9.5



More information about the systemd-devel mailing list