From 545d97fa0e9f8bcbf9b550c8e159a7efa06df440 Mon Sep 17 00:00:00 2001 From: riastradh Date: Sat, 29 May 2021 16:49:49 +0000 Subject: thinkpad(4): Add dtrace probe for hotkey events. --- sys/dev/acpi/thinkpad_acpi.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sys/dev') 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 @@ -27,11 +27,12 @@ */ #include -__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 #include #include +#include #include #include @@ -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; -- cgit