lkml.org 
[lkml]   [2017]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v2 16/16] hyper-v: trace vmbus_send_tl_connect_request()
I added an additional set of trace points for when channel gets notified or signals host.

diff -urNp linux-msft/drivers/hv/channel.c msft-4.14-rc3/drivers/hv/channel.c
--- linux-msft/drivers/hv/channel.c 2017-10-03 10:06:54.893209237 -0700
+++ msft-4.14-rc3/drivers/hv/channel.c 2017-10-03 10:07:35.501665114 -0700
@@ -55,6 +55,8 @@ void vmbus_setevent(struct vmbus_channel
{
struct hv_monitor_page *monitorpage;

+ trace_vmbus_setevent(channel);
+
/*
* For channels marked as in "low latency" mode
* bypass the monitor page mechanism.
diff -urNp linux-msft/drivers/hv/connection.c msft-4.14-rc3/drivers/hv/connection.c
--- linux-msft/drivers/hv/connection.c 2017-10-03 10:06:54.893209237 -0700
+++ msft-4.14-rc3/drivers/hv/connection.c 2017-10-03 10:07:35.501665114 -0700
@@ -322,6 +322,8 @@ void vmbus_on_event(unsigned long data)
struct vmbus_channel *channel = (void *) data;
unsigned long time_limit = jiffies + 2;

+ trace_vmbus_on_event(channel);
+
do {
void (*callback_fn)(void *);

diff -urNp linux-msft/drivers/hv/hv_trace.h msft-4.14-rc3/drivers/hv/hv_trace.h
--- linux-msft/drivers/hv/hv_trace.h 2017-10-03 10:08:06.514014019 -0700
+++ msft-4.14-rc3/drivers/hv/hv_trace.h 2017-10-03 10:07:35.505665159 -0700
@@ -294,6 +294,29 @@ TRACE_EVENT(vmbus_send_tl_connect_reques
)
);

+DECLARE_EVENT_CLASS(vmbus_channel,
+ TP_PROTO(const struct vmbus_channel *channel),
+ TP_ARGS(channel),
+ TP_STRUCT__entry(__field(u32, relid)),
+ TP_fast_assign(__entry->relid = channel->offermsg.child_relid),
+ TP_printk("relid 0x%x", __entry->relid)
+);
+
+DEFINE_EVENT(vmbus_channel, vmbus_chan_sched,
+ TP_PROTO(const struct vmbus_channel *channel),
+ TP_ARGS(channel)
+);
+
+DEFINE_EVENT(vmbus_channel, vmbus_setevent,
+ TP_PROTO(const struct vmbus_channel *channel),
+ TP_ARGS(channel)
+);
+
+DEFINE_EVENT(vmbus_channel, vmbus_on_event,
+ TP_PROTO(const struct vmbus_channel *channel),
+ TP_ARGS(channel)
+);
+
#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE
diff -urNp linux-msft/drivers/hv/vmbus_drv.c msft-4.14-rc3/drivers/hv/vmbus_drv.c
--- linux-msft/drivers/hv/vmbus_drv.c 2017-10-03 10:06:54.897209282 -0700
+++ msft-4.14-rc3/drivers/hv/vmbus_drv.c 2017-10-03 10:07:35.505665159 -0700
@@ -948,6 +948,7 @@ static void vmbus_chan_sched(struct hv_p
continue;

++channel->interrupts_in;
+ trace_vmbus_chan_sched(channel);

switch (channel->callback_mode) {
case HV_CALL_ISR:
\
 
 \ /
  Last update: 2017-10-03 19:11    [W:0.112 / U:7.048 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site