Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162726839
D4693.id11633.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D4693.id11633.diff
View Options
Index: sys/dev/hyperv/vmbus/hv_connection.c
===================================================================
--- sys/dev/hyperv/vmbus/hv_connection.c
+++ sys/dev/hyperv/vmbus/hv_connection.c
@@ -423,12 +423,6 @@
// mtx_unlock(&channel->inbound_lock);
}
-#ifdef HV_DEBUG_INTR
-extern uint32_t hv_intr_count;
-extern uint32_t hv_vmbus_swintr_event_cpu[MAXCPU];
-extern uint32_t hv_vmbus_intr_cpu[MAXCPU];
-#endif
-
/**
* Handler for events
*/
@@ -449,17 +443,6 @@
KASSERT(cpu <= mp_maxid, ("VMBUS: hv_vmbus_on_events: "
"cpu out of range!"));
-#ifdef HV_DEBUG_INTR
- int i;
- hv_vmbus_swintr_event_cpu[cpu]++;
- if (hv_intr_count % 10000 == 0) {
- printf("VMBUS: Total interrupt %d\n", hv_intr_count);
- for (i = 0; i < mp_ncpus; i++)
- printf("VMBUS: hw cpu[%d]: %d, event sw intr cpu[%d]: %d\n",
- i, hv_vmbus_intr_cpu[i], i, hv_vmbus_swintr_event_cpu[i]);
- }
-#endif
-
if ((hv_vmbus_protocal_version == HV_VMBUS_VERSION_WS2008) ||
(hv_vmbus_protocal_version == HV_VMBUS_VERSION_WIN7)) {
maxdword = HV_MAX_NUM_CHANNELS_SUPPORTED >> 5;
Index: sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
===================================================================
--- sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
+++ sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
@@ -220,32 +220,24 @@
return FILTER_HANDLED;
}
-#ifdef HV_DEBUG_INTR
-uint32_t hv_intr_count = 0;
-#endif
uint32_t hv_vmbus_swintr_event_cpu[MAXCPU];
-uint32_t hv_vmbus_intr_cpu[MAXCPU];
+u_long *hv_vmbus_intr_cpu[MAXCPU];
void
hv_vector_handler(struct trapframe *trap_frame)
{
-#ifdef HV_DEBUG_INTR
int cpu;
-#endif
/*
* Disable preemption.
*/
critical_enter();
-#ifdef HV_DEBUG_INTR
/*
* Do a little interrupt counting.
*/
cpu = PCPU_GET(cpuid);
- hv_vmbus_intr_cpu[cpu]++;
- hv_intr_count++;
-#endif
+ (*hv_vmbus_intr_cpu[cpu])++;
hv_vmbus_isr(trap_frame);
@@ -484,6 +476,7 @@
vmbus_bus_init(void)
{
int i, j, n, ret;
+ char buf[MAXCOMLEN + 1];
if (vmbus_inited)
return (0);
@@ -520,13 +513,15 @@
setup_args.vector = hv_vmbus_g_context.hv_cb_vector;
CPU_FOREACH(j) {
- hv_vmbus_intr_cpu[j] = 0;
hv_vmbus_swintr_event_cpu[j] = 0;
hv_vmbus_g_context.hv_event_intr_event[j] = NULL;
hv_vmbus_g_context.hv_msg_intr_event[j] = NULL;
hv_vmbus_g_context.event_swintr[j] = NULL;
hv_vmbus_g_context.msg_swintr[j] = NULL;
+ snprintf(buf, sizeof(buf), "cpu%d:hyperv", j);
+ intrcnt_add(buf, &hv_vmbus_intr_cpu[j]);
+
for (i = 0; i < 2; i++)
setup_args.page_buffers[2 * j + i] = NULL;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 17, 5:01 AM (15 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35159919
Default Alt Text
D4693.id11633.diff (2 KB)
Attached To
Mode
D4693: Add interrupt counter
Attached
Detach File
Event Timeline
Log In to Comment