blob: 488b873b563ea34dd0e05f8b714cefcb64610500 [file] [log] [blame]
Vitaly Kuznetsovc9fe0f82017-10-29 12:21:00 -07001#undef TRACE_SYSTEM
2#define TRACE_SYSTEM hyperv
3
4#if !defined(_HV_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _HV_TRACE_H
6
7#include <linux/tracepoint.h>
8
9DECLARE_EVENT_CLASS(vmbus_hdr_msg,
10 TP_PROTO(const struct vmbus_channel_message_header *hdr),
11 TP_ARGS(hdr),
12 TP_STRUCT__entry(__field(unsigned int, msgtype)),
13 TP_fast_assign(__entry->msgtype = hdr->msgtype;),
14 TP_printk("msgtype=%u", __entry->msgtype)
15);
16
17DEFINE_EVENT(vmbus_hdr_msg, vmbus_on_msg_dpc,
18 TP_PROTO(const struct vmbus_channel_message_header *hdr),
19 TP_ARGS(hdr)
20);
21
Vitaly Kuznetsov716fa522017-10-29 12:21:01 -070022DEFINE_EVENT(vmbus_hdr_msg, vmbus_on_message,
23 TP_PROTO(const struct vmbus_channel_message_header *hdr),
24 TP_ARGS(hdr)
25);
26
Vitaly Kuznetsov03b81e62017-10-29 12:21:02 -070027TRACE_EVENT(vmbus_onoffer,
28 TP_PROTO(const struct vmbus_channel_offer_channel *offer),
29 TP_ARGS(offer),
30 TP_STRUCT__entry(
31 __field(u32, child_relid)
32 __field(u8, monitorid)
33 __field(u16, is_ddc_int)
34 __field(u32, connection_id)
35 __array(char, if_type, 16)
36 __array(char, if_instance, 16)
37 __field(u16, chn_flags)
38 __field(u16, mmio_mb)
39 __field(u16, sub_idx)
40 ),
41 TP_fast_assign(__entry->child_relid = offer->child_relid;
42 __entry->monitorid = offer->monitorid;
43 __entry->is_ddc_int = offer->is_dedicated_interrupt;
44 __entry->connection_id = offer->connection_id;
45 memcpy(__entry->if_type,
46 &offer->offer.if_type.b, 16);
47 memcpy(__entry->if_instance,
48 &offer->offer.if_instance.b, 16);
49 __entry->chn_flags = offer->offer.chn_flags;
50 __entry->mmio_mb = offer->offer.mmio_megabytes;
51 __entry->sub_idx = offer->offer.sub_channel_index;
52 ),
53 TP_printk("child_relid 0x%x, monitorid 0x%x, is_dedicated %d, "
54 "connection_id 0x%x, if_type %pUl, if_instance %pUl, "
55 "chn_flags 0x%x, mmio_megabytes %d, sub_channel_index %d",
56 __entry->child_relid, __entry->monitorid,
57 __entry->is_ddc_int, __entry->connection_id,
58 __entry->if_type, __entry->if_instance,
59 __entry->chn_flags, __entry->mmio_mb,
60 __entry->sub_idx
61 )
62 );
63
Vitaly Kuznetsovc9fe0f82017-10-29 12:21:00 -070064#undef TRACE_INCLUDE_PATH
65#define TRACE_INCLUDE_PATH .
66#undef TRACE_INCLUDE_FILE
67#define TRACE_INCLUDE_FILE hv_trace
68#endif /* _HV_TRACE_H */
69
70/* This part must be outside protection */
71#include <trace/define_trace.h>