1 diff -Naur xenomai-2.2.3/config.log xenomai-2.2.3-good/config.log
2 --- xenomai-2.2.3/config.log 2006-12-07 17:17:36.000000000 -0500
3 +++ xenomai-2.2.3-good/config.log 2006-12-07 11:09:13.000000000 -0500
5 config.status:894: creating doc/docbook/custom-stylesheets/xsl/html/onechunk.xsl
6 config.status:894: creating doc/docbook/xenomai/Makefile
7 config.status:960: creating src/include/xeno_config.h
8 +config.status:1092: src/include/xeno_config.h is unchanged
9 config.status:1171: linking ./include/asm-i386 to src/include/asm/xenomai
10 config.status:1171: linking ./include/asm-generic to src/include/asm-generic/xenomai
11 config.status:1408: executing depfiles commands
12 diff -Naur xenomai-2.2.3/include/nucleus/ltt.h xenomai-2.2.3-good/include/nucleus/ltt.h
13 --- xenomai-2.2.3/include/nucleus/ltt.h 2006-07-18 09:18:51.000000000 -0400
14 +++ xenomai-2.2.3-good/include/nucleus/ltt.h 2006-11-14 10:01:40.000000000 -0500
17 extern int xnltt_filter;
19 -#define xnltt_log_event(ev, args...) \
20 +#define xnltt_log_event(ev, args...) ;
23 if (xnltt_evtable[ev].ltt_filter & xnltt_filter) \
24 ltt_log_std_formatted_event(xnltt_evtable[ev].ltt_evid, ##args); \
28 static inline void xnltt_set_filter (int mask)
30 diff -Naur xenomai-2.2.3/include/nucleus/synch.h xenomai-2.2.3-good/include/nucleus/synch.h
31 --- xenomai-2.2.3/include/nucleus/synch.h 2006-08-13 15:42:27.000000000 -0400
32 +++ xenomai-2.2.3-good/include/nucleus/synch.h 2006-11-14 10:01:40.000000000 -0500
37 +/****************************************************
38 + * JOV - XenoLTT - 2006-10-24
39 + * To enable LTTng tracing functions on Xenomai synch
40 + ****************************************************/
41 +#include <linux/ltt/ltt-facility-xenoltt.h>
43 #ifndef _XENO_NUCLEUS_SYNCH_H
44 #define _XENO_NUCLEUS_SYNCH_H
48 static inline void xnsynch_set_owner (xnsynch_t *synch, struct xnthread *thread)
50 +/**************************************************************
51 + * JOV - XenoLTT - 2006-10-24
52 + * Here we place the tracing call for the set owner function
53 + * Args: synch object, thread
54 + **************************************************************/
55 + trace_xenoltt_xeno_synch_set_owner(thread,synch);
56 synch->owner = thread;
59 diff -Naur xenomai-2.2.3/ksrc/nucleus/intr.c xenomai-2.2.3-good/ksrc/nucleus/intr.c
60 --- xenomai-2.2.3/ksrc/nucleus/intr.c 2006-07-18 09:19:03.000000000 -0400
61 +++ xenomai-2.2.3-good/ksrc/nucleus/intr.c 2006-11-14 10:01:18.000000000 -0500
63 xnarch_memory_barrier();
65 xnltt_log_event(xeno_ev_ienter, irq);
72 xnarch_memory_barrier();
74 xnltt_log_event(xeno_ev_ienter, irq);
79 xnintr_shirq_lock(shirq);
81 xnarch_memory_barrier();
83 xnltt_log_event(xeno_ev_ienter, irq);
88 xnintr_shirq_lock(shirq);
89 diff -Naur xenomai-2.2.3/ksrc/nucleus/ltt.c xenomai-2.2.3-good/ksrc/nucleus/ltt.c
90 --- xenomai-2.2.3/ksrc/nucleus/ltt.c 2006-07-18 09:19:03.000000000 -0400
91 +++ xenomai-2.2.3-good/ksrc/nucleus/ltt.c 2006-11-14 10:01:18.000000000 -0500
94 vsnprintf(markbuf, sizeof(markbuf), fmt, ap);
96 - ltt_log_std_formatted_event(xnltt_evtable[xeno_ev_mark].
98 +// ltt_log_std_formatted_event(xnltt_evtable[xeno_ev_mark]. ltt_evid, markbuf);
103 /* Create all custom LTT events we need. */
105 for (ev = 0; xnltt_evtable[ev].ltt_label != NULL; ev++) {
107 evid = ltt_create_event(xnltt_evtable[ev].ltt_label,
108 xnltt_evtable[ev].ltt_format,
109 LTT_CUSTOM_EV_FORMAT_TYPE_STR, NULL);
113 xnltt_evtable[ev].ltt_evid = -1;
114 - ltt_destroy_event(xnltt_evtable[ev].ltt_evid);
115 +// ltt_destroy_event(xnltt_evtable[ev].ltt_evid);
120 void __exit xnltt_umount(void)
125 for (ev = 0; xnltt_evtable[ev].ltt_evid != -1; ev++)
126 ltt_destroy_event(xnltt_evtable[ev].ltt_evid);
130 struct xnltt_evmap xnltt_evtable[] = {
131 diff -Naur xenomai-2.2.3/ksrc/nucleus/pod.c xenomai-2.2.3-good/ksrc/nucleus/pod.c
132 --- xenomai-2.2.3/ksrc/nucleus/pod.c 2006-09-03 09:45:41.000000000 -0400
133 +++ xenomai-2.2.3-good/ksrc/nucleus/pod.c 2006-12-08 09:03:25.000000000 -0500
135 #include <nucleus/module.h>
136 #include <nucleus/ltt.h>
138 +/****************************************************
139 + * JOV - XenoLTT - 2006-09-25
140 + * To enable LTTng tracing functions on Xenomai task
141 + ****************************************************/
142 +#include <linux/ltt/ltt-facility-xenoltt.h>
144 /* NOTE: We need to initialize the globals: remember that this code
145 also runs over user-space VMs... */
148 void xnpod_schedule_handler(void)
150 xnltt_log_event(xeno_ev_smpsched);
152 xnsched_set_resched(xnpod_current_sched());
158 xnltt_log_event(xeno_ev_thrinit, thread->name, flags);
160 +/*************************************************************
161 + * JOV - XenoLTT - 2006-09-25
162 + * Here we place the tracing call for the thread init function
163 + * Args: Name, address, flags, priority
164 + *************************************************************/
165 + trace_xenoltt_xeno_thread_init(thread->name,thread,flags,prio);
167 xnlock_get_irqsave(&nklock, s);
168 thread->sched = xnpod_current_sched();
171 xnltt_log_event(xeno_ev_thrstart, thread->name);
173 +/**************************************************************
174 + * JOV - XenoLTT - 2006-09-25
175 + * Here we place the tracing call for the thread start function
176 + * Args: Name, address
177 + **************************************************************/
178 + trace_xenoltt_xeno_thread_start(thread->name,thread);
180 #if defined(__KERNEL__) && defined(CONFIG_XENO_OPT_PERVASIVE)
181 if (testbits(thread->status, XNSHADOW)) {
182 xnlock_put_irqrestore(&nklock, s);
183 @@ -1027,7 +1048,14 @@
184 xnlock_get_irqsave(&nklock, s);
186 xnltt_log_event(xeno_ev_threstart, thread->name);
187 +/***************************************************************
188 + * JOV - XenoLTT - 2006-10-05
189 + * Here we place the tracing call for the thread restart function
190 + * Args: Name, address
191 + ***************************************************************/
192 + trace_xenoltt_xeno_thread_restart(thread->name,thread);
195 /* Break the thread out of any wait it is currently in. */
196 xnpod_unblock_thread(thread);
198 @@ -1226,6 +1254,14 @@
200 xnltt_log_event(xeno_ev_thrdelete, thread->name);
202 +/***************************************************************
203 + * JOV - XenoLTT - 2006-09-25
204 + * Here we place the tracing call for the thread delete function
205 + * Args: Name, address
206 + ***************************************************************/
207 + trace_xenoltt_xeno_thread_delete(thread->name,thread);
210 sched = thread->sched;
212 removeq(&nkpod->threadq, &thread->glink);
213 @@ -1375,6 +1411,14 @@
215 xnltt_log_event(xeno_ev_thrsuspend, thread->name, mask, timeout, wchan);
217 +/****************************************************************
218 + * JOV - XenoLTT - 2006-09-25
219 + * Here we place the tracing call for the thread suspend function
220 + * Args: Name, address, address of a pended resource
221 + ****************************************************************/
222 + trace_xenoltt_xeno_thread_suspend(thread->name,thread,mask,timeout,wchan);
225 sched = thread->sched;
227 if (thread == sched->runthread) {
228 @@ -1552,6 +1596,14 @@
229 xnlock_get_irqsave(&nklock, s);
231 xnltt_log_event(xeno_ev_thresume, thread->name, mask);
233 +/***************************************************************
234 + * JOV - XenoLTT - 2006-09-25
235 + * Here we place the tracing call for the thread resume function
236 + * Args: Name, address, start time, period
237 + ***************************************************************/
238 + trace_xenoltt_xeno_thread_resume(thread->name,thread,mask);
240 xnarch_trace_pid(xnthread_user_task(thread) ?
241 xnarch_user_pid(xnthread_archtcb(thread)) : -1,
242 xnthread_current_priority(thread));
243 @@ -1701,6 +1753,12 @@
244 xnlock_get_irqsave(&nklock, s);
246 xnltt_log_event(xeno_ev_thrunblock, thread->name, thread->status);
247 +/***************************************************************
248 + * JOV - XenoLTT - 2006-09-25
249 + * Here we place the tracing call for the thread unblock function
250 + * Args: Name, address, start time, period
251 + ***************************************************************/
252 + trace_xenoltt_xeno_thread_unblock(thread->name,thread,thread->status);
254 if (testbits(thread->status, XNDELAY))
255 xnpod_resume_thread(thread, XNDELAY);
256 @@ -1785,6 +1843,13 @@
258 xnltt_log_event(xeno_ev_threnice, thread->name, prio);
260 +/***************************************************************
261 + * JOV - XenoLTT - 2006-09-25
262 + * Here we place the tracing call for the thread renice function
263 + * Args: Name, address, priority
264 + ***************************************************************/
265 + trace_xenoltt_xeno_thread_renice(thread->name,thread,prio);
267 oldprio = thread->cprio;
269 /* Change the thread priority, taking in account an undergoing PIP
270 @@ -2316,11 +2381,11 @@
271 #ifdef CONFIG_XENO_OPT_PERVASIVE
273 #endif /* CONFIG_XENO_OPT_PERVASIVE */
275 if (xnarch_escalate())
278 xnltt_log_event(xeno_ev_resched);
280 #endif /* __KERNEL__ */
282 /* No immediate rescheduling is possible if an ISR or callout
283 @@ -2419,6 +2484,13 @@
285 xnltt_log_event(xeno_ev_switch, threadout->name, threadin->name);
287 +/**************************************************************
288 + * JOV - XenoLTT - 2006-11-09
289 + * Here we place the tracing call for the thread switch fonction
290 + * Args: Name, address, thread out name, address
291 + **************************************************************/
292 + trace_xenoltt_xeno_thread_switch(threadin->name,threadin,threadout->name,threadout);
294 #if defined(__KERNEL__) && defined(CONFIG_XENO_OPT_PERVASIVE)
295 shadow = testbits(threadout->status, XNSHADOW);
296 #endif /* __KERNEL__ && CONFIG_XENO_OPT_PERVASIVE */
297 @@ -2526,6 +2598,7 @@
298 xnthread_t *runthread = sched->runthread, *threadin;
300 xnltt_log_event(xeno_ev_fastsched);
302 xnarch_trace_pid(xnthread_user_task(runthread) ?
303 xnarch_user_pid(xnthread_archtcb(runthread)) : -1,
304 xnthread_current_priority(runthread));
305 @@ -3245,7 +3318,7 @@
308 xnltt_log_event(xeno_ev_tmtick, xnpod_current_thread()->name);
311 #ifdef CONFIG_XENO_OPT_WATCHDOG
312 if (xnarch_get_cpu_tsc() >= sched->watchdog_trigger) {
313 if (!xnpod_root_p() && sched->watchdog_armed) {
314 @@ -3371,6 +3444,13 @@
316 xnltt_log_event(xeno_ev_thrperiodic, thread->name, idate, period);
318 +/**************************************************************
319 + * JOV - XenoLTT - 2006-09-25
320 + * Here we place the tracing call for the set periodic function
321 + * Args: Name, address, start time, period
322 + **************************************************************/
323 + trace_xenoltt_xeno_thread_set_period(thread->name,thread,idate,period,&thread->ptimer);
325 if (period == XN_INFINITE) {
326 if (xntimer_running_p(&thread->ptimer))
327 xntimer_stop(&thread->ptimer);
328 @@ -3392,6 +3472,7 @@
330 xntimer_get_raw_expiry(&thread->ptimer)
331 + xntimer_interval(&thread->ptimer);
333 xnpod_suspend_thread(thread, XNDELAY, XN_INFINITE,
336 @@ -3466,6 +3547,13 @@
338 xnltt_log_event(xeno_ev_thrwait, thread->name);
340 +/**************************************************************
341 + * JOV - XenoLTT - 2006-09-25
342 + * Here we place the tracing call for the wait perdiod function
343 + * Args: Name, address
344 + **************************************************************/
345 + trace_xenoltt_xeno_thread_wait_period(thread->name,thread);
347 now = xntimer_get_rawclock(); /* Work with either TSC or periodic ticks. */
349 if (likely(now < thread->pexpect)) {
350 @@ -3500,7 +3588,13 @@
351 #endif /* BITS_PER_LONG < 64 */
352 thread->pexpect += period * overruns;
355 +/**************************************************************
356 + * JOV - XenoLTT - 2006-10-16
357 + * Here we place the tracing call for the event of period exceed
358 + * Args: Name, address, number of periods exceeded
359 + **************************************************************/
360 + trace_xenoltt_xeno_thread_missed_period(thread->name,thread,overruns);
363 thread->pexpect += period;
365 diff -Naur xenomai-2.2.3/ksrc/nucleus/synch.c xenomai-2.2.3-good/ksrc/nucleus/synch.c
366 --- xenomai-2.2.3/ksrc/nucleus/synch.c 2006-09-03 12:44:10.000000000 -0400
367 +++ xenomai-2.2.3-good/ksrc/nucleus/synch.c 2006-11-14 10:01:18.000000000 -0500
369 #include <nucleus/module.h>
370 #include <nucleus/ltt.h>
372 +/****************************************************
373 + * JOV - XenoLTT - 2006-10-17
374 + * To enable LTTng tracing functions on Xenomai synch
375 + ****************************************************/
376 +#include <linux/ltt/ltt-facility-xenoltt.h>
378 * \fn void xnsynch_init(xnsynch_t *synch, xnflags_t flags);
379 * \brief Initialize a synchronization object.
382 initph(&synch->link);
385 if (flags & XNSYNCH_PIP)
386 flags |= XNSYNCH_PRIO; /* Obviously... */
390 static inline void xnsynch_renice_thread(xnthread_t *thread, int prio)
392 - thread->cprio = prio;
393 +/**************************************************************
394 + * JOV - XenoLTT - 2006-10-24
395 + * Here we place the tracing call for the set renice function
396 + * Args: thread, priority
397 + **************************************************************/
398 + trace_xenoltt_xeno_synch_renice_thread(thread->name,thread,prio);
399 + thread->cprio = prio;
402 /* Ignoring the XNSYNCH_DREORD flag on purpose here. */
404 xnlock_get_irqsave(&nklock, s);
406 xnltt_log_event(xeno_ev_sleepon, thread->name, synch);
407 +/**************************************************************
408 + * JOV - XenoLTT - 2006-10-17
409 + * Here we place the tracing call for the sleepon synch function
410 + * Args: Name, address, synch
411 + **************************************************************/
412 + trace_xenoltt_xeno_synch_sleepon(thread->name,thread,synch);
414 if (!testbits(synch->status, XNSYNCH_PRIO)) { /* i.e. FIFO */
415 appendpq(&synch->pendq, &thread->plink);
418 xnlock_get_irqsave(&nklock, s);
420 - holder = getpq(&synch->pendq);
421 +/**************************************************************
422 + * JOV - XenoLTT - 2006-10-30
423 + * Here we place the tracing call for the unblock function
424 + * Args: Last Owner Name, address, synch
425 + **************************************************************/
426 + trace_xenoltt_xeno_synch_unlock(lastowner->name,lastowner,synch);
428 + holder = getpq(&synch->pendq);
431 thread = link2thread(holder, plink);
433 synch->owner = thread;
434 __setbits(thread->status, XNWAKEN);
435 xnltt_log_event(xeno_ev_wakeup1, thread->name, synch);
436 - xnpod_resume_thread(thread, XNPEND);
437 +/**************************************************************
438 + * JOV - XenoLTT - 2006-10-17
439 + * Here we place the tracing call for the wakeup synch function
440 + * Args: Name, address, synch
441 + **************************************************************/
442 + trace_xenoltt_xeno_synch_wakeup1(thread->name,thread,synch);
444 + xnpod_resume_thread(thread, XNPEND);
449 synch->owner = thread;
450 __setbits(thread->status, XNWAKEN);
451 xnltt_log_event(xeno_ev_wakeupx, thread->name, synch);
452 - xnpod_resume_thread(thread, XNPEND);
453 +/**************************************************************
454 + * JOV - XenoLTT - 2006-10-17
455 + * Here we place the tracing call for the wakeup synch function
456 + * Args: Name, address, synch
457 + **************************************************************/
458 + trace_xenoltt_xeno_synch_wakeupx(thread->name,thread,synch);
460 + xnpod_resume_thread(thread, XNPEND);
462 if (testbits(synch->status, XNSYNCH_CLAIMED))
463 xnsynch_clear_boost(synch, lastowner);
465 xnlock_get_irqsave(&nklock, s);
467 xnltt_log_event(xeno_ev_syncflush, synch, reason);
468 +/**************************************************************
469 + * JOV - XenoLTT - 2006-10-17
470 + * Here we place the tracing call for the wakeup synch function
471 + * Args: Name, address, synch
472 + **************************************************************/
473 + trace_xenoltt_xeno_synch_syncflush(synch,reason);
475 status = emptypq_p(&synch->pendq) ? XNSYNCH_DONE : XNSYNCH_RESCHED;
478 xnsynch_t *synch = thread->wchan;
480 xnltt_log_event(xeno_ev_syncforget, thread->name, synch);
482 +/**************************************************************
483 + * JOV - XenoLTT - 2006-10-17
484 + * Here we place the tracing call for the forget synch call
485 + * Args: Name, address, synch
486 + **************************************************************/
487 + trace_xenoltt_xeno_synch_syncforget(thread->name, thread, synch);
489 __clrbits(thread->status, XNPEND);
490 thread->wchan = NULL;
491 removepq(&synch->pendq, &thread->plink);
492 diff -Naur xenomai-2.2.3/ksrc/nucleus/timer.c xenomai-2.2.3-good/ksrc/nucleus/timer.c
493 --- xenomai-2.2.3/ksrc/nucleus/timer.c 2006-08-27 06:45:08.000000000 -0400
494 +++ xenomai-2.2.3-good/ksrc/nucleus/timer.c 2006-11-14 10:01:18.000000000 -0500
496 #include <nucleus/thread.h>
497 #include <nucleus/timer.h>
499 +/****************************************************
500 + * JOV - XenoLTT - 2006-10-18
501 + * To enable LTTng tracing functions on Xenomai task
502 + ****************************************************/
503 +#include <linux/ltt/ltt-facility-xenoltt.h>
505 static inline void xntimer_enqueue_aperiodic(xntimer_t *timer)
507 xntimerq_t *q = &timer->sched->timerqueue;
508 @@ -202,22 +208,30 @@
509 xnsched_t *sched = xnpod_current_sched();
510 xntimerq_t *timerq = &sched->timerqueue;
516 while ((holder = xntimerq_head(timerq)) != NULL) {
517 timer = aplink2timer(holder);
519 if (xntimerh_date(&timer->aplink) - nkschedlat >
520 - xnarch_get_cpu_tsc())
521 + xnarch_get_cpu_tsc())
522 /* No need to continue in aperiodic mode since timeout
523 dates are ordered by increasing values. */
527 xntimer_dequeue_aperiodic(timer);
529 if (timer != &nkpod->htimer) {
530 if (!testbits(nkpod->status, XNTLOCK)) {
531 - timer->handler(timer->cookie);
532 + /**************************************************************
533 + * JOV - XenoLTT - 2006-10-18
534 + * Here we place the tracing call for the current thread timer tick
535 + * Args: Name, Address
536 + **************************************************************/
537 + trace_xenoltt_xeno_timer_tick("1",holder);
539 + timer->handler(timer->cookie);
541 if (timer->interval == XN_INFINITE ||
542 !testbits(timer->status, XNTIMER_DEQUEUED)
543 @@ -234,12 +248,13 @@
544 nkpod->htimer.interval;
549 - /* By postponing the propagation of the low-priority host
550 + /* By postponing the propagation of the low-priority host
551 tick to the interrupt epilogue (see
552 xnintr_irq_handler()), we save some I-cache, which
553 translates into precious microsecs on low-end hw. */
554 - __setbits(sched->status, XNHTICK);
555 + __setbits(sched->status, XNHTICK);
557 xntimerh_date(&timer->aplink) += timer->interval;
558 xntimer_enqueue_aperiodic(timer);
560 xntlholder_t *holder;
566 /* Update the periodic clocks keeping the things strictly
567 monotonous (this routine is run on every cpu, but only CPU
568 XNTIMER_KEEPER_ID should do this). */
570 timerq = &sched->timerwheel[nkpod->jiffies & XNTIMER_WHEELMASK];
572 while ((holder = xntlist_head(timerq)) != NULL) {
573 - timer = plink2timer(holder);
574 + timer = plink2timer(holder);
576 if (xntlholder_date(&timer->plink) > nkpod->jiffies)
580 if (timer != &nkpod->htimer) {
581 if (!testbits(nkpod->status, XNTLOCK)) {
582 - timer->handler(timer->cookie);
583 + /**************************************************************
584 + * JOV - XenoLTT - 2006-10-18
585 + * Here we place the tracing call for the current thread timer tick
586 + * Args: Name, Address
587 + **************************************************************/
588 + trace_xenoltt_xeno_timer_tick("2",holder);
590 + timer->handler(timer->cookie);
592 if (timer->interval == XN_INFINITE ||
593 !testbits(timer->status, XNTIMER_DEQUEUED)
595 nkpod->jiffies + nkpod->htimer.interval;
599 - __setbits(sched->status, XNHTICK);
601 + __setbits(sched->status, XNHTICK);
603 xntlholder_date(&timer->plink) =
604 nkpod->jiffies + timer->interval;
605 diff -Naur xenomai-2.2.3/src/skins/native/libnative_la-alarm.loT xenomai-2.2.3-good/src/skins/native/libnative_la-alarm.loT
606 --- xenomai-2.2.3/src/skins/native/libnative_la-alarm.loT 1969-12-31 19:00:00.000000000 -0500
607 +++ xenomai-2.2.3-good/src/skins/native/libnative_la-alarm.loT 2006-12-07 11:09:26.000000000 -0500
609 +# libnative_la-alarm.lo - a libtool object file
610 +# Generated by ltmain.sh - GNU libtool 1.5.6 (1.1220.2.95 2004/04/11 05:50:42) Debian: 224 $
612 +# Please DO NOT delete this file!
613 +# It is necessary for linking the library.
615 +# Name of the PIC object.