diff options
| author | riastradh <riastradh@NetBSD.org> | 2021-05-29 16:49:49 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2021-05-29 16:49:49 +0000 |
| commit | 545d97fa0e9f8bcbf9b550c8e159a7efa06df440 (patch) | |
| tree | ff91f6253de5de77317d1e01fc9dcd2eb46d5c57 /sys/dev/acpi | |
| parent | 93fb9a654c6dff82b452e2f61c801bcc98ab4f98 (diff) | |
thinkpad(4): Add dtrace probe for hotkey events.
Diffstat (limited to 'sys/dev/acpi')
| -rw-r--r-- | sys/dev/acpi/thinkpad_acpi.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/acpi/thinkpad_acpi.c b/sys/dev/acpi/thinkpad_acpi.c index 7360ec3f55a..50a077347b4 100644 --- a/sys/dev/acpi/thinkpad_acpi.c +++ b/sys/dev/acpi/thinkpad_acpi.c @@ -1,4 +1,4 @@ -/* $NetBSD: thinkpad_acpi.c,v 1.50 2021/05/29 16:49:39 riastradh Exp $ */ +/* $NetBSD: thinkpad_acpi.c,v 1.51 2021/05/29 16:49:49 riastradh Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca> @@ -27,11 +27,12 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.50 2021/05/29 16:49:39 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.51 2021/05/29 16:49:49 riastradh Exp $"); #include <sys/param.h> #include <sys/device.h> #include <sys/module.h> +#include <sys/sdt.h> #include <sys/systm.h> #include <dev/acpi/acpireg.h> @@ -363,6 +364,10 @@ thinkpad_notify_handler(ACPI_HANDLE hdl, uint32_t notify, void *opaque) (void)AcpiOsExecute(OSL_NOTIFY_HANDLER, thinkpad_get_hotkeys, sc); } +SDT_PROBE_DEFINE2(sdt, thinkpad, hotkey, MHKP, + "struct thinkpad_softc *"/*sc*/, + "ACPI_INTEGER"/*val*/); + static void thinkpad_get_hotkeys(void *opaque) { @@ -379,6 +384,7 @@ thinkpad_get_hotkeys(void *opaque) AcpiFormatException(rv)); return; } + SDT_PROBE2(sdt, thinkpad, hotkey, MHKP, sc, val); if (val == 0) return; |
