Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi thinkpad(4): Add dtrace probe for hotkey events.



details:   https://anonhg.NetBSD.org/src/rev/95f86b529fac
branches:  trunk
changeset: 983564:95f86b529fac
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat May 29 16:49:49 2021 +0000

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

diffstat:

 sys/dev/acpi/thinkpad_acpi.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (42 lines):

diff -r 2cd99c3509aa -r 95f86b529fac sys/dev/acpi/thinkpad_acpi.c
--- a/sys/dev/acpi/thinkpad_acpi.c      Sat May 29 16:49:39 2021 +0000
+++ b/sys/dev/acpi/thinkpad_acpi.c      Sat May 29 16:49:49 2021 +0000
@@ -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@localhost>
@@ -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 @@
        (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 @@
                            AcpiFormatException(rv));
                        return;
                }
+               SDT_PROBE2(sdt, thinkpad, hotkey, MHKP,  sc, val);
 
                if (val == 0)
                        return;



Home | Main Index | Thread Index | Old Index