summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2016-09-20 10:27:14 +0000
committermikeb <mikeb@openbsd.org>2016-09-20 10:27:14 +0000
commit1311c613a2a185bd90486af8138e3862da11f643 (patch)
tree0be286b076d0293f57ba6c3cbe1d470ad0c81ea4
parentSupport a few more relocations, most notably R_ARM_MOVW_ABS_NC and (diff)
downloadwireguard-openbsd-1311c613a2a185bd90486af8138e3862da11f643.tar.xz
wireguard-openbsd-1311c613a2a185bd90486af8138e3862da11f643.zip
Add an API to hook up event counters
-rw-r--r--sys/dev/pv/hyperv.c8
-rw-r--r--sys/dev/pv/hypervvar.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/pv/hyperv.c b/sys/dev/pv/hyperv.c
index a34ca0fb50c..0a737e8ff0c 100644
--- a/sys/dev/pv/hyperv.c
+++ b/sys/dev/pv/hyperv.c
@@ -1918,3 +1918,11 @@ hv_attach_devices(struct hv_softc *sc)
}
return (0);
}
+
+void
+hv_evcount_attach(struct hv_channel *ch, const char *name)
+{
+ struct hv_softc *sc = ch->ch_sc;
+
+ evcount_attach(&ch->ch_evcnt, name, &sc->sc_idtvec);
+}
diff --git a/sys/dev/pv/hypervvar.h b/sys/dev/pv/hypervvar.h
index f484cfadcda..b8da4a17892 100644
--- a/sys/dev/pv/hypervvar.h
+++ b/sys/dev/pv/hypervvar.h
@@ -187,6 +187,7 @@ void hv_handle_free(struct hv_channel *, uint32_t);
int hv_channel_open(struct hv_channel *, void *, size_t, void (*)(void *),
void *);
int hv_channel_close(struct hv_channel *);
+void hv_evcount_attach(struct hv_channel *, const char *);
int hv_channel_send(struct hv_channel *, void *, uint32_t, uint64_t,
int, uint32_t);
int hv_channel_send_sgl(struct hv_channel *, struct vmbus_gpa *,