aboutsummaryrefslogtreecommitdiff
path: root/drivers/watchdog/watchdog_core.c
diff options
context:
space:
mode:
authorGravatar Uwe Kleine-König <u.kleine-koenig@pengutronix.de> 2022-10-08 19:46:02 +0200
committerGravatar Wim Van Sebroeck <wim@linux-watchdog.org> 2022-10-12 09:47:02 +0200
commite25b091bed4946078c0998e4be77bc56824a9adf (patch)
treeb13c53f92809db30f0e762217e6861a1914dc435 /drivers/watchdog/watchdog_core.c
parentwatchdog: twl4030_wdt: add missing mod_devicetable.h include (diff)
downloadlinux-e25b091bed4946078c0998e4be77bc56824a9adf.tar.gz
linux-e25b091bed4946078c0998e4be77bc56824a9adf.tar.bz2
linux-e25b091bed4946078c0998e4be77bc56824a9adf.zip
watchdog: Add tracing events for the most usual watchdog events
To simplify debugging which process touches a watchdog and when, add tracing events for .start(), .set_timeout(), .ping() and .stop(). Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20221008174602.3972859-1-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Diffstat (limited to 'drivers/watchdog/watchdog_core.c')
-rw-r--r--drivers/watchdog/watchdog_core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/watchdog/watchdog_core.c b/drivers/watchdog/watchdog_core.c
index 3fe8a7edc252..c777a612d932 100644
--- a/drivers/watchdog/watchdog_core.c
+++ b/drivers/watchdog/watchdog_core.c
@@ -38,6 +38,9 @@
#include "watchdog_core.h" /* For watchdog_dev_register/... */
+#define CREATE_TRACE_POINTS
+#include <trace/events/watchdog.h>
+
static DEFINE_IDA(watchdog_ida);
static int stop_on_reboot = -1;
@@ -163,6 +166,7 @@ static int watchdog_reboot_notifier(struct notifier_block *nb,
int ret;
ret = wdd->ops->stop(wdd);
+ trace_watchdog_stop(wdd, ret);
if (ret)
return NOTIFY_BAD;
}