Module Name:    src
Committed By:   riastradh
Date:           Sat May 29 16:49:49 UTC 2021

Modified Files:
        src/sys/dev/acpi: thinkpad_acpi.c

Log Message:
thinkpad(4): Add dtrace probe for hotkey events.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/acpi/thinkpad_acpi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/thinkpad_acpi.c
diff -u src/sys/dev/acpi/thinkpad_acpi.c:1.50 src/sys/dev/acpi/thinkpad_acpi.c:1.51
--- src/sys/dev/acpi/thinkpad_acpi.c:1.50	Sat May 29 16:49:39 2021
+++ src/sys/dev/acpi/thinkpad_acpi.c	Sat May 29 16:49:49 2021
@@ -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 <jmcne...@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,
 	(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;

Reply via email to