diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2017-10-29 12:21:00 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-04 12:04:24 +0100 |
commit | c9fe0f8fa4136c2451dcc012e48fbf4470d6b592 (patch) | |
tree | 5e8ce5d0a106d970b061041158eba858af9a35e6 /drivers/hv/hv_trace.h | |
parent | 32946cc2d5686d320aab9fb162d8949c767f7519 (diff) | |
download | linux-c9fe0f8fa4136c2451dcc012e48fbf4470d6b592.tar.bz2 |
hyper-v: trace vmbus_on_msg_dpc()
Add tracing subsystem to Hyper-V VMBus module and add tracepoint
to vmbus_on_msg_dpc() which is called when we receive a message from host.
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/hv_trace.h')
-rw-r--r-- | drivers/hv/hv_trace.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/hv/hv_trace.h b/drivers/hv/hv_trace.h new file mode 100644 index 000000000000..9c2772922c76 --- /dev/null +++ b/drivers/hv/hv_trace.h @@ -0,0 +1,29 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM hyperv + +#if !defined(_HV_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) +#define _HV_TRACE_H + +#include <linux/tracepoint.h> + +DECLARE_EVENT_CLASS(vmbus_hdr_msg, + TP_PROTO(const struct vmbus_channel_message_header *hdr), + TP_ARGS(hdr), + TP_STRUCT__entry(__field(unsigned int, msgtype)), + TP_fast_assign(__entry->msgtype = hdr->msgtype;), + TP_printk("msgtype=%u", __entry->msgtype) +); + +DEFINE_EVENT(vmbus_hdr_msg, vmbus_on_msg_dpc, + TP_PROTO(const struct vmbus_channel_message_header *hdr), + TP_ARGS(hdr) +); + +#undef TRACE_INCLUDE_PATH +#define TRACE_INCLUDE_PATH . +#undef TRACE_INCLUDE_FILE +#define TRACE_INCLUDE_FILE hv_trace +#endif /* _HV_TRACE_H */ + +/* This part must be outside protection */ +#include <trace/define_trace.h> |