hyper-v: trace vmbus_request_offers()
authorVitaly Kuznetsov <vkuznets@redhat.com>
Sun, 29 Oct 2017 19:21:08 +0000 (12:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 Nov 2017 11:04:25 +0000 (12:04 +0100)
Add tracepoint to CHANNELMSG_REQUESTOFFERS sender.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/channel_mgmt.c
drivers/hv/hv_trace.h

index c33b7412f303d6ccf0f89fc7a928ff37ed87cc4d..b27edff8796e0df2d0fe2f1a70e358349911b565 100644 (file)
@@ -1224,9 +1224,11 @@ int vmbus_request_offers(void)
 
        msg->msgtype = CHANNELMSG_REQUESTOFFERS;
 
-
        ret = vmbus_post_msg(msg, sizeof(struct vmbus_channel_message_header),
                             true);
+
+       trace_vmbus_request_offers(ret);
+
        if (ret != 0) {
                pr_err("Unable to request offers - %d\n", ret);
 
index 2a046547107fdf75606e611027e45fbae89b6b63..566ac0f2fe566eb46e4623ee6fe896dd950da61e 100644 (file)
@@ -122,6 +122,14 @@ TRACE_EVENT(vmbus_onversion_response,
            TP_printk("version_supported %d", __entry->ver)
        );
 
+TRACE_EVENT(vmbus_request_offers,
+           TP_PROTO(int ret),
+           TP_ARGS(ret),
+           TP_STRUCT__entry(__field(int, ret)),
+           TP_fast_assign(__entry->ret = ret),
+           TP_printk("sending ret %d", __entry->ret)
+       );
+
 #undef TRACE_INCLUDE_PATH
 #define TRACE_INCLUDE_PATH .
 #undef TRACE_INCLUDE_FILE