Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1735957
| From | Vitaly Kuznetsov <vkuznets@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 10/16] hyper-v: trace vmbus_open() |
| Date | 2017-09-20 19:30 +0200 |
| Message-ID | <urQYX-63Y-43@gated-at.bofh.it> (permalink) |
| References | <urQYV-63Y-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Add tracepoint to CHANNELMSG_OPENCHANNEL sender.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
drivers/hv/channel.c | 2 ++
drivers/hv/hv_trace.h | 27 +++++++++++++++++++++++++++
2 files changed, 29 insertions(+)
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 676a130f0575..7b114b390871 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 b8d8460afc07..aefbbb56e686 100644
--- a/drivers/hv/hv_trace.h
+++ b/drivers/hv/hv_trace.h
@@ -128,6 +128,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
--
2.13.5
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/16] Hyper-V: add tracing to VMBus module and trace all messages Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-09-20 19:30 +0200 [PATCH 03/16] hyper-v: trace vmbus_onoffer() Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-09-20 19:30 +0200 [PATCH 05/16] hyper-v: trace vmbus_onopen_result() Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-09-20 19:30 +0200 [PATCH 10/16] hyper-v: trace vmbus_open() Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-09-20 19:30 +0200 [PATCH 16/16] hyper-v: trace vmbus_send_tl_connect_request() Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-09-20 19:30 +0200 [PATCH 12/16] hyper-v: trace vmbus_establish_gpadl() Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-09-20 19:30 +0200
csiph-web