The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: devel@linuxdriverproject.org,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	linux-kernel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH v2 16/16] hyper-v: trace vmbus_send_tl_connect_request()
Date: Tue, 3 Oct 2017 10:10:01 -0700	[thread overview]
Message-ID: <20171003101001.2c8e4ad8@xeon-e3> (raw)
In-Reply-To: <20170929132602.24487-17-vkuznets@redhat.com>

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:

  reply	other threads:[~2017-10-03 17:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-29 13:25 [PATCH v2 00/16] Hyper-V: add tracing to VMBus module and trace all messages Vitaly Kuznetsov
2017-09-29 13:25 ` [PATCH v2 01/16] hyper-v: trace vmbus_on_msg_dpc() Vitaly Kuznetsov
2017-10-02  0:18   ` kbuild test robot
2017-10-04  0:08     ` Steven Rostedt
2017-09-29 13:25 ` [PATCH v2 02/16] hyper-v: trace vmbus_on_message() Vitaly Kuznetsov
2017-09-29 13:25 ` [PATCH v2 03/16] hyper-v: trace vmbus_onoffer() Vitaly Kuznetsov
2017-09-29 13:25 ` [PATCH v2 04/16] hyper-v: trace vmbus_onoffer_rescind() Vitaly Kuznetsov
2017-09-29 13:25 ` [PATCH v2 05/16] hyper-v: trace vmbus_onopen_result() Vitaly Kuznetsov
2017-09-29 13:25 ` [PATCH v2 06/16] hyper-v: trace vmbus_ongpadl_created() Vitaly Kuznetsov
2017-09-29 13:25 ` [PATCH v2 07/16] hyper-v: trace vmbus_ongpadl_torndown() Vitaly Kuznetsov
2017-09-29 13:25 ` [PATCH v2 08/16] hyper-v: trace vmbus_onversion_response() Vitaly Kuznetsov
2017-09-29 13:25 ` [PATCH v2 09/16] hyper-v: trace vmbus_request_offers() Vitaly Kuznetsov
2017-09-29 13:25 ` [PATCH v2 10/16] hyper-v: trace vmbus_open() Vitaly Kuznetsov
2017-09-29 13:25 ` [PATCH v2 11/16] hyper-v: trace vmbus_close_internal() Vitaly Kuznetsov
2017-09-29 13:25 ` [PATCH v2 12/16] hyper-v: trace vmbus_establish_gpadl() Vitaly Kuznetsov
2017-09-29 13:25 ` [PATCH v2 13/16] hyper-v: trace vmbus_teardown_gpadl() Vitaly Kuznetsov
2017-09-29 13:26 ` [PATCH v2 14/16] hyper-v: trace vmbus_negotiate_version() Vitaly Kuznetsov
2017-09-29 13:26 ` [PATCH v2 15/16] hyper-v: trace vmbus_release_relid() Vitaly Kuznetsov
2017-09-29 13:26 ` [PATCH v2 16/16] hyper-v: trace vmbus_send_tl_connect_request() Vitaly Kuznetsov
2017-10-03 17:10   ` Stephen Hemminger [this message]
2017-10-04 14:10     ` Vitaly Kuznetsov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171003101001.2c8e4ad8@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=devel@linuxdriverproject.org \
    --cc=haiyangz@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sthemmin@microsoft.com \
    --cc=vkuznets@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox