summaryrefslogtreecommitdiffstats
path: root/drivers/hv
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2017-10-29 12:21:09 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-11-04 12:04:25 +0100
commit9202d771ca37514bfbc2c3a8fdcb018f40a6bd8a (patch)
tree0fd1a356684bac6ca061ca1cdc6da227ba264313 /drivers/hv
parentd6706e63367a9c783974db4b94cf8980d31c4cb2 (diff)
downloadlinux-stable-9202d771ca37514bfbc2c3a8fdcb018f40a6bd8a.tar.gz
linux-stable-9202d771ca37514bfbc2c3a8fdcb018f40a6bd8a.tar.bz2
linux-stable-9202d771ca37514bfbc2c3a8fdcb018f40a6bd8a.zip
hyper-v: trace vmbus_open()
Add tracepoint to CHANNELMSG_OPENCHANNEL 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>
Diffstat (limited to 'drivers/hv')
-rw-r--r--drivers/hv/channel.c2
-rw-r--r--drivers/hv/hv_trace.h27
2 files changed, 29 insertions, 0 deletions
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index a406beb10dd0..739b3fe1e0fb 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -185,6 +185,8 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
ret = vmbus_post_msg(open_msg,
sizeof(struct vmbus_channel_open_channel), true);
+ trace_vmbus_open(open_msg, ret);
+
if (ret != 0) {
err = ret;
goto error_clean_msglist;
diff --git a/drivers/hv/hv_trace.h b/drivers/hv/hv_trace.h
index 566ac0f2fe56..38fedb803bd8 100644
--- a/drivers/hv/hv_trace.h
+++ b/drivers/hv/hv_trace.h
@@ -130,6 +130,33 @@ TRACE_EVENT(vmbus_request_offers,
TP_printk("sending ret %d", __entry->ret)
);
+TRACE_EVENT(vmbus_open,
+ TP_PROTO(const struct vmbus_channel_open_channel *msg, int ret),
+ TP_ARGS(msg, ret),
+ TP_STRUCT__entry(
+ __field(u32, child_relid)
+ __field(u32, openid)
+ __field(u32, gpadlhandle)
+ __field(u32, target_vp)
+ __field(u32, offset)
+ __field(int, ret)
+ ),
+ TP_fast_assign(
+ __entry->child_relid = msg->child_relid;
+ __entry->openid = msg->openid;
+ __entry->gpadlhandle = msg->ringbuffer_gpadlhandle;
+ __entry->target_vp = msg->target_vp;
+ __entry->offset = msg->downstream_ringbuffer_pageoffset;
+ __entry->ret = ret;
+ ),
+ TP_printk("sending child_relid 0x%x, openid %d, "
+ "gpadlhandle 0x%x, target_vp 0x%x, offset 0x%x, ret %d",
+ __entry->child_relid, __entry->openid,
+ __entry->gpadlhandle, __entry->target_vp,
+ __entry->offset, __entry->ret
+ )
+ );
+
#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE