hyper-v: trace vmbus_teardown_gpadl()
authorVitaly Kuznetsov <vkuznets@redhat.com>
Sun, 29 Oct 2017 19:21:12 +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_GPADL_TEARDOWN 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.c
drivers/hv/hv_trace.h

index 823ddc714d56312652605660407998baca0a0a14..0382d7b600a1a46be1efdc316a6cbe6dfa75cd64 100644 (file)
@@ -519,6 +519,8 @@ int vmbus_teardown_gpadl(struct vmbus_channel *channel, u32 gpadl_handle)
        ret = vmbus_post_msg(msg, sizeof(struct vmbus_channel_gpadl_teardown),
                             true);
 
+       trace_vmbus_teardown_gpadl(msg, ret);
+
        if (ret)
                goto post_msg_err;
 
index 978e70bdc7c55e6dd066c8c1626549606005fbbb..cd33a52ef27f83562c3500fd6e221b84499a3ec1 100644 (file)
@@ -214,6 +214,24 @@ TRACE_EVENT(vmbus_establish_gpadl_body,
                    )
        );
 
+TRACE_EVENT(vmbus_teardown_gpadl,
+           TP_PROTO(const struct vmbus_channel_gpadl_teardown *msg, int ret),
+           TP_ARGS(msg, ret),
+           TP_STRUCT__entry(
+                   __field(u32, child_relid)
+                   __field(u32, gpadl)
+                   __field(int, ret)
+                   ),
+           TP_fast_assign(
+                   __entry->child_relid = msg->child_relid;
+                   __entry->gpadl = msg->gpadl;
+                   __entry->ret = ret;
+                   ),
+           TP_printk("sending child_relid 0x%x, gpadl 0x%x, ret %d",
+                     __entry->child_relid, __entry->gpadl, __entry->ret
+                   )
+       );
+
 #undef TRACE_INCLUDE_PATH
 #define TRACE_INCLUDE_PATH .
 #undef TRACE_INCLUDE_FILE