[PATCH 2/2] include: Add client-side request tracing.

Rémi Bernon rbernon at codeweavers.com
Tue Nov 17 04:57:16 CST 2020


Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
 include/wine/server.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/wine/server.h b/include/wine/server.h
index ac5dcc6f8bc..1f22a56a184 100644
--- a/include/wine/server.h
+++ b/include/wine/server.h
@@ -26,6 +26,7 @@
 #include <winbase.h>
 #include <winternl.h>
 #include <wine/server_protocol.h>
+#include <wine/debug.h>
 
 /* client communication functions */
 
@@ -125,6 +126,8 @@ static inline void *wine_server_get_ptr( client_ptr_t ptr )
 
 #define SERVER_START_REQ(type) \
     do { \
+        WINE_DECLARE_DEBUG_CHANNEL(client); \
+        static const char *const __req_name = #type; \
         struct __server_request_info __req; \
         struct type##_request * const req = &__req.u.req.type##_request; \
         const struct type##_reply * const reply = &__req.u.reply.type##_reply; \
@@ -132,10 +135,12 @@ static inline void *wine_server_get_ptr( client_ptr_t ptr )
         __req.u.req.request_header.req = REQ_##type; \
         __req.data_count = 0; \
         (void)reply; \
+        TRACE_(client)("start %s\n", __req_name); \
         do
 
 #define SERVER_END_REQ \
         while(0); \
+        TRACE_(client)("end   %s\n", __req_name); \
     } while(0)
 
 
-- 
2.29.2




More information about the wine-devel mailing list