#include <t_syslog.h>
マクロ定義 | |
#define | TCNT_TRACE_BUFFER 1024 |
#define | TRACE_GET_TIM() (current_time) |
#define | TRACE_STOP UINT_C(0x00) |
#define | TRACE_RINGBUF UINT_C(0x01) |
#define | TRACE_AUTOSTOP UINT_C(0x02) |
#define | TRACE_CLEAR UINT_C(0x04) |
#define | trace_0(type) trace_write_0(type) |
#define | trace_1(type, arg1) trace_write_1(type, (intptr_t)(arg1)) |
#define | trace_2(type, arg1, arg2) trace_write_2(type, (intptr_t)(arg1), (intptr_t)(arg2)) |
#define | trace_3(type, arg1, arg2, arg3) |
#define | LOG_TSKSTAT(p_tcb) trace_2(LOG_TYPE_TSKSTAT, p_tcb, p_tcb->tstat) |
#define | LOG_DSP_LEAVE(p_tcb) trace_1(LOG_TYPE_DSP|LOG_LEAVE, p_tcb) |
#define | LOG_SYSLOG_WRI_LOG_ENTER(prio, p_syslog) trace_wri_log((TRACE *) p_syslog) |
型定義 | |
typedef SYSLOG | TRACE |
関数 | |
void | trace_initialize (intptr_t exinf) |
ER | trace_sta_log (MODE mode) |
ER | trace_wri_log (TRACE *p_trace) |
ER | trace_rea_log (TRACE *p_trace) |
void | trace_dump (intptr_t exinf) |
void | trace_write_0 (uint_t type) |
void | trace_write_1 (uint_t type, intptr_t arg1) |
void | trace_write_2 (uint_t type, intptr_t arg1, intptr_t arg2) |
void | trace_write_3 (uint_t type, intptr_t arg1, intptr_t arg2, intptr_t arg3) |
変数 | |
TRACE | trace_buffer [] |
uint_t | trace_count |
uint_t | trace_head |
uint_t | trace_tail |
uint_t | trace_lost |
#define LOG_DSP_LEAVE | ( | p_tcb | ) | trace_1(LOG_TYPE_DSP|LOG_LEAVE, p_tcb) |
trace_config.h の 176 行で定義されています。
#define LOG_SYSLOG_WRI_LOG_ENTER | ( | prio, | |||
p_syslog | ) | trace_wri_log((TRACE *) p_syslog) |
#define LOG_TSKSTAT | ( | p_tcb | ) | trace_2(LOG_TYPE_TSKSTAT, p_tcb, p_tcb->tstat) |
trace_config.h の 174 行で定義されています。
参照元 dly_tsk(), make_dormant(), make_non_wait(), make_runnable(), rcv_dtq(), rcv_pdq(), rsm_tsk(), slp_tsk(), sus_tsk(), trcv_dtq(), trcv_pdq(), tslp_tsk(), wobj_make_wait(), と wobj_make_wait_tmout().
#define TCNT_TRACE_BUFFER 1024 |
#define trace_0 | ( | type | ) | trace_write_0(type) |
trace_config.h の 156 行で定義されています。
#define trace_1 | ( | type, | |||
arg1 | ) | trace_write_1(type, (intptr_t)(arg1)) |
trace_config.h の 159 行で定義されています。
参照元 log_dsp_enter(), log_dsp_leave(), log_exc_enter(), log_exc_leave(), log_inh_enter(), と log_inh_leave().
#define trace_2 | ( | type, | |||
arg1, | |||||
arg2 | ) | trace_write_2(type, (intptr_t)(arg1), (intptr_t)(arg2)) |
trace_config.h の 162 行で定義されています。
#define trace_3 | ( | type, | |||
arg1, | |||||
arg2, | |||||
arg3 | ) |
値:
trace_write_3(type, (intptr_t)(arg1), (intptr_t)(arg2), \ (intptr_t)(arg3))
trace_config.h の 165 行で定義されています。
#define TRACE_AUTOSTOP UINT_C(0x02) |
#define TRACE_CLEAR UINT_C(0x04) |
#define TRACE_GET_TIM | ( | ) | (current_time) |
#define TRACE_RINGBUF UINT_C(0x01) |
trace_config.h の 93 行で定義されています。
#define TRACE_STOP UINT_C(0x00) |
trace_config.h の 76 行で定義されています。
void trace_dump | ( | intptr_t | exinf | ) |
trace_dump.c の 146 行で定義されています。
参照先 trace_print(), と trace_rea_log().
00147 { 00148 TRACE trace; 00149 void (*putc)(char_t); 00150 00151 putc = (void (*)(char_t)) exinf; 00152 while (trace_rea_log(&trace) >= 0) { 00153 trace_print(&trace, putc); 00154 } 00155 }
void trace_initialize | ( | intptr_t | exinf | ) |
trace_config.c の 65 行で定義されています。
参照先 trace_count, trace_head, trace_mode, と trace_tail.
00066 { 00067 MODE mode = ((MODE) exinf); 00068 00069 trace_count = 0U; 00070 trace_head = trace_tail = 0U; 00071 trace_mode = mode; 00072 }
trace_config.c の 136 行で定義されています。
参照先 E_OBJ, E_OK, SIL_LOC_INT, SIL_PRE_LOC, SIL_UNL_INT, TCNT_TRACE_BUFFER, trace_count, と trace_head.
参照元 trace_dump().
00137 { 00138 ER_UINT ercd; 00139 SIL_PRE_LOC; 00140 00141 SIL_LOC_INT(); 00142 00143 /* 00144 * トレースログバッファからの取出し 00145 */ 00146 if (trace_count > 0U) { 00147 *p_trace = trace_buffer[trace_head]; 00148 trace_count--; 00149 trace_head++; 00150 if (trace_head >= TCNT_TRACE_BUFFER) { 00151 trace_head = 0U; 00152 } 00153 ercd = E_OK; 00154 } 00155 else { 00156 ercd = E_OBJ; 00157 } 00158 00159 SIL_UNL_INT(); 00160 return(ercd); 00161 }
trace_config.c の 78 行で定義されています。
参照先 E_OK, TRACE_CLEAR, trace_count, trace_head, trace_mode, と trace_tail.
00079 { 00080 if ((mode & TRACE_CLEAR) != 0U) { 00081 trace_count = 0U; 00082 trace_head = trace_tail = 0U; 00083 } 00084 trace_mode = mode; 00085 return(E_OK); 00086 }
trace_config.c の 92 行で定義されています。
参照先 E_OK, SYSLOG::logtim, SIL_LOC_INT, SIL_PRE_LOC, SIL_UNL_INT, TCNT_TRACE_BUFFER, TRACE_AUTOSTOP, trace_count, TRACE_GET_TIM, trace_head, trace_mode, TRACE_STOP, と trace_tail.
参照元 trace_write_0(), trace_write_1(), trace_write_2(), と trace_write_3().
00093 { 00094 SIL_PRE_LOC; 00095 00096 if (trace_mode != TRACE_STOP) { 00097 SIL_LOC_INT(); 00098 00099 /* 00100 * トレース時刻の設定 00101 * 00102 * LOG_WRI_LOG_ENTERから呼ばれた場合にp_trace->logtimを書き換 00103 * えてしまうのは気持ちが悪いが,wri_logの方で上書きするため問 00104 * 題はない. 00105 */ 00106 p_trace->logtim = TRACE_GET_TIM(); 00107 00108 /* 00109 * トレースバッファに記録 00110 */ 00111 trace_buffer[trace_tail] = *p_trace; 00112 trace_tail++; 00113 if (trace_tail >= TCNT_TRACE_BUFFER) { 00114 trace_tail = 0U; 00115 } 00116 if (trace_count < TCNT_TRACE_BUFFER) { 00117 trace_count++; 00118 if (trace_count >= TCNT_TRACE_BUFFER 00119 && (trace_mode & TRACE_AUTOSTOP) != 0U) { 00120 trace_mode = TRACE_STOP; 00121 } 00122 } 00123 else { 00124 trace_head = trace_tail; 00125 } 00126 00127 SIL_UNL_INT(); 00128 } 00129 return(E_OK); 00130 }
void trace_write_0 | ( | uint_t | type | ) |
trace_config.c の 168 行で定義されています。
参照先 SYSLOG::logtype, と trace_wri_log().
00169 { 00170 TRACE trace; 00171 00172 trace.logtype = type; 00173 (void) trace_wri_log(&trace); 00174 }
void trace_write_1 | ( | uint_t | type, | |
intptr_t | arg1 | |||
) |
trace_config.c の 177 行で定義されています。
参照先 SYSLOG::loginfo, SYSLOG::logtype, と trace_wri_log().
00178 { 00179 TRACE trace; 00180 00181 trace.logtype = type; 00182 trace.loginfo[0] = arg1; 00183 (void) trace_wri_log(&trace); 00184 }
void trace_write_2 | ( | uint_t | type, | |
intptr_t | arg1, | |||
intptr_t | arg2 | |||
) |
trace_config.c の 187 行で定義されています。
参照先 SYSLOG::loginfo, SYSLOG::logtype, と trace_wri_log().
00188 { 00189 TRACE trace; 00190 00191 trace.logtype = type; 00192 trace.loginfo[0] = arg1; 00193 trace.loginfo[1] = arg2; 00194 (void) trace_wri_log(&trace); 00195 }
void trace_write_3 | ( | uint_t | type, | |
intptr_t | arg1, | |||
intptr_t | arg2, | |||
intptr_t | arg3 | |||
) |
trace_config.c の 198 行で定義されています。
参照先 SYSLOG::loginfo, SYSLOG::logtype, と trace_wri_log().
00199 { 00200 TRACE trace; 00201 00202 trace.logtype = type; 00203 trace.loginfo[0] = arg1; 00204 trace.loginfo[1] = arg2; 00205 trace.loginfo[2] = arg3; 00206 (void) trace_wri_log(&trace); 00207 }
trace_config.c の 55 行で定義されています。
trace_config.c の 56 行で定義されています。
参照元 trace_initialize(), trace_rea_log(), trace_sta_log(), と trace_wri_log().
trace_config.c の 57 行で定義されています。
参照元 trace_initialize(), trace_rea_log(), trace_sta_log(), と trace_wri_log().
Copyright © 2008 by Kijineko Inc.