00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _ASM_RTAI_DEBUG_H_
00027 #define _ASM_RTAI_DEBUG_H_
00028
00029 #define RT_DEBUG_LEVEL 0
00030 #if RT_DEBUG_LEVEL > 0
00031 #define D1(x) x
00032 #else
00033 #define D1(x)
00034 #endif
00035 #if RT_DEBUG_LEVEL > 1
00036 #define D2(x) x
00037 #else
00038 #define D2(x)
00039 #endif
00040
00041 #define LL_SPLIT(x) ((unsigned long*)&(x))[1], ((unsigned long*)&(x))[0]
00042
00043 #define RTAI_SCHED_PROC_DEBUG_DEF \
00044 union { \
00045 RTIME tsc; \
00046 unsigned long hltsc[2]; \
00047 } tsc
00048
00049 #define RT_TIMES_DEBUG(fmt, args...) fmt \
00050 "\n OSCR 0X%08X, tsc 0X%08lX%08lX," \
00051 "\n intr_time 0X%08lX%08lX, tick_time 0X%08lX%08lX," \
00052 "\n OSMR0: 0X%08X, periodic_tick 0X%08X," \
00053 "\n linux_time 0X%08lX%08lX, linux_tick 0X%08X\n" , \
00054 ## args, OSCR, rtai_tsc.hltsc[1], rtai_tsc.hltsc[0], \
00055 ((unsigned long*)&rt_times.intr_time)[1], \
00056 ((unsigned long*)&rt_times.intr_time)[0], \
00057 ((unsigned long*)&rt_times.tick_time)[1], \
00058 ((unsigned long*)&rt_times.tick_time)[0], \
00059 OSMR0, rt_times.periodic_tick, \
00060 ((unsigned long*)&rt_times.linux_time)[1], \
00061 ((unsigned long*)&rt_times.linux_time)[0], \
00062 rt_times.linux_tick
00063
00064 #define RTAI_SCHED_PROC_DEBUG \
00065 PROC_PRINT( RT_TIMES_DEBUG( "Saved OSCR 0X%08lX, next_match 0X%08lX, " \
00066 "timer crashes %lu, latency %d,\n" \
00067 "setup_time_TIMER_CPUNIT %d, setup_time_TIMER_UNIT %d,", \
00068 _oscr, next_match, rtai_timer_crash, \
00069 tuned.latency, tuned.setup_time_TIMER_CPUNIT, \
00070 tuned.setup_time_TIMER_UNIT ) )
00071
00072 #endif