Module: xenomai-jki
Branch: queues/ftrace
Commit: b5c1c5374bbd149945113c6f1d689bcacf0072b3
URL:    
http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=b5c1c5374bbd149945113c6f1d689bcacf0072b3

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Thu Feb 14 13:04:49 2013 +0100

nucleus: Convert watchdog tracepoints

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 include/trace/xn_nucleus.h |   10 ++++++++++
 ksrc/nucleus/sched.c       |    9 ++++-----
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/include/trace/xn_nucleus.h b/include/trace/xn_nucleus.h
index a9c23af..3d8aef0 100644
--- a/include/trace/xn_nucleus.h
+++ b/include/trace/xn_nucleus.h
@@ -254,6 +254,16 @@ DEFINE_EVENT(thread_event_verbose, 
xn_nucleus_shadow_relaxed,
        TP_ARGS(thread)
 );
 
+DEFINE_EVENT(thread_event_verbose, xn_nucleus_watchdog_signal,
+       TP_PROTO(struct xnthread *thread),
+       TP_ARGS(thread)
+);
+
+DEFINE_EVENT(thread_event_verbose, xn_nucleus_watchdog_kill,
+       TP_PROTO(struct xnthread *thread),
+       TP_ARGS(thread)
+);
+
 TRACE_EVENT(xn_nucleus_shadow_map,
        TP_PROTO(struct xnthread *thread),
        TP_ARGS(thread),
diff --git a/ksrc/nucleus/sched.c b/ksrc/nucleus/sched.c
index 3391f4a..f9f5e4e 100644
--- a/ksrc/nucleus/sched.c
+++ b/ksrc/nucleus/sched.c
@@ -28,6 +28,8 @@
 #include <nucleus/heap.h>
 #include <asm/xenomai/bits/sched.h>
 
+#include <trace/events/xn_nucleus.h>
+
 static struct xnsched_class *xnsched_class_highest;
 
 #define for_each_xnsched_class(p) \
@@ -93,9 +95,7 @@ static void xnsched_watchdog_handler(struct xntimer *timer)
 #ifdef CONFIG_XENO_OPT_PERVASIVE
        if (xnthread_test_state(thread, XNSHADOW) &&
            !xnthread_amok_p(thread)) {
-               trace_mark(xn_nucleus, watchdog_signal,
-                          "thread %p thread_name %s",
-                          thread, xnthread_name(thread));
+               trace_xn_nucleus_watchdog_signal(thread);
                xnprintf("watchdog triggered -- signaling runaway thread "
                         "'%s'\n", xnthread_name(thread));
                xnthread_set_info(thread, XNAMOK);
@@ -104,8 +104,7 @@ static void xnsched_watchdog_handler(struct xntimer *timer)
        } else
 #endif /* CONFIG_XENO_OPT_PERVASIVE */
        {
-               trace_mark(xn_nucleus, watchdog, "thread %p thread_name %s",
-                          thread, xnthread_name(thread));
+               trace_xn_nucleus_watchdog_kill(thread);
                xnprintf("watchdog triggered -- killing runaway thread '%s'\n",
                         xnthread_name(thread));
                xnpod_delete_thread(thread);


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to