hyper-v: trace vmbus_onversion_response()
authorVitaly Kuznetsov <vkuznets@redhat.com>
Sun, 29 Oct 2017 19:21:07 +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_VERSION_RESPONSE handler.

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 d1cb85257bf02997759a76ed2b558173a2d331b8..c33b7412f303d6ccf0f89fc7a928ff37ed87cc4d 100644 (file)
@@ -1127,6 +1127,9 @@ static void vmbus_onversion_response(
        unsigned long flags;
 
        version_response = (struct vmbus_channel_version_response *)hdr;
+
+       trace_vmbus_onversion_response(version_response);
+
        spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
 
        list_for_each_entry(msginfo, &vmbus_connection.chn_msg_list,
index 84c08cdf723513ecd52920c5e6fad3f2aae6805f..2a046547107fdf75606e611027e45fbae89b6b63 100644 (file)
@@ -111,6 +111,17 @@ TRACE_EVENT(vmbus_ongpadl_torndown,
            TP_printk("gpadl 0x%x", __entry->gpadl)
        );
 
+TRACE_EVENT(vmbus_onversion_response,
+           TP_PROTO(const struct vmbus_channel_version_response *response),
+           TP_ARGS(response),
+           TP_STRUCT__entry(
+                   __field(u8, ver)
+                   ),
+           TP_fast_assign(__entry->ver = response->version_supported;
+                   ),
+           TP_printk("version_supported %d", __entry->ver)
+       );
+
 #undef TRACE_INCLUDE_PATH
 #define TRACE_INCLUDE_PATH .
 #undef TRACE_INCLUDE_FILE