28 #ifndef _RTEMS_RECORD_H 29 #define _RTEMS_RECORD_H 31 #include "recorddata.h" 34 #include <rtems/score/cpu.h> 49 rtems_record_item Header[ 3 ];
51 rtems_record_item Items[ RTEMS_ZERO_LENGTH_ARRAY ];
55 unsigned int item_count;
68 void _Record_Initialize(
void );
70 bool _Record_Thread_create(
75 void _Record_Thread_start(
80 void _Record_Thread_restart(
85 void _Record_Thread_delete(
90 void _Record_Thread_switch(
99 void _Record_Fatal_dump_base64(
101 bool always_set_to_false,
102 Internal_errors_t
code 105 void _Record_Fatal_dump_base64_zlib(
107 bool always_set_to_false,
108 Internal_errors_t
code 111 void _Record_Thread_terminate(
125 return _Atomic_Load_uint( &
control->head, ATOMIC_ORDER_RELAXED );
139 return head - tail >=
control->mask + 1U;
148 return ( tail - head - 1U ) &
control->mask;
153 return rtems_counter_read();
159 rtems_record_item Version;
160 rtems_record_item Processor_maximum;
161 rtems_record_item Count;
162 rtems_record_item Frequency;
163 rtems_record_item Info[64];
168 size_t _Record_String_to_items(
172 rtems_record_item *items,
176 void _Record_Caller(
void *return_address );
178 void _Record_Caller_3(
179 void *return_address,
184 void _Record_Caller_4(
185 void *return_address,
194 void _Record_Caller_arg_2(
195 void *return_address,
200 void _Record_Caller_arg_3(
201 void *return_address,
207 void _Record_Caller_arg_4(
208 void *return_address,
215 void _Record_Caller_arg_5(
216 void *return_address,
224 void _Record_Caller_arg_6(
225 void *return_address,
234 void _Record_Caller_arg_7(
235 void *return_address,
245 void _Record_Caller_arg_8(
246 void *return_address,
257 void _Record_Caller_arg_9(
258 void *return_address,
270 void _Record_Caller_arg_10(
271 void *return_address,
284 void _Record_Entry_2(
285 void *return_address,
291 void _Record_Entry_3(
292 void *return_address,
299 void _Record_Entry_4(
300 void *return_address,
308 void _Record_Entry_5(
309 void *return_address,
318 void _Record_Entry_6(
319 void *return_address,
329 void _Record_Entry_7(
330 void *return_address,
341 void _Record_Entry_8(
342 void *return_address,
354 void _Record_Entry_9(
355 void *return_address,
368 void _Record_Entry_10(
369 void *return_address,
384 void *return_address,
391 void *return_address,
399 void *return_address,
408 void *return_address,
418 void *return_address,
429 void *return_address,
441 void *return_address,
454 void *return_address,
467 void _Record_Exit_10(
468 void *return_address,
512 head = _Record_Head(
control );
534 _CPU_ISR_Disable( level );
538 cpu_self = _Per_CPU_Get();
541 head = _Record_Head(
control );
559 rtems_record_item *item;
567 item->event =
context->now | event;
596 _CPU_ISR_Enable(
context->level );
629 const rtems_record_item *items,
887 #define rtems_record_caller() _Record_Caller( RTEMS_RETURN_ADDRESS() ) 902 #define rtems_record_caller_3( event, data ) \ 903 _Record_Caller_3( RTEMS_RETURN_ADDRESS(), event, data ) 920 #define rtems_record_caller_4( event_0, data_0, event_1, data_1 ) \ 922 RTEMS_RETURN_ADDRESS(), \ 941 #define rtems_record_caller_arg( data ) \ 942 _Record_Caller_arg( RTEMS_RETURN_ADDRESS(), data ) 957 #define rtems_record_caller_arg_2( data_0, data_1 ) \ 958 _Record_Caller_arg_2( \ 959 RTEMS_RETURN_ADDRESS(), \ 978 #define rtems_record_caller_arg_3( data_0, data_1, data_2 ) \ 979 _Record_Caller_arg_3( \ 980 RTEMS_RETURN_ADDRESS(), \ 1001 #define rtems_record_caller_arg_4( data_0, data_1, data_2, data_3 ) \ 1002 _Record_Caller_arg_4( \ 1003 RTEMS_RETURN_ADDRESS(), \ 1026 #define rtems_record_caller_arg_5( data_0, data_1, data_2, data_3, data_4 ) \ 1027 _Record_Caller_arg_5( \ 1028 RTEMS_RETURN_ADDRESS(), \ 1053 #define rtems_record_caller_arg_6( \ 1061 _Record_Caller_arg_6( \ 1062 RTEMS_RETURN_ADDRESS(), \ 1089 #define rtems_record_caller_arg_7( \ 1098 _Record_Caller_arg_7( \ 1099 RTEMS_RETURN_ADDRESS(), \ 1128 #define rtems_record_caller_arg_8( \ 1138 _Record_Caller_arg_8( \ 1139 RTEMS_RETURN_ADDRESS(), \ 1170 #define rtems_record_caller_arg_9( \ 1181 _Record_Caller_arg_9( \ 1182 RTEMS_RETURN_ADDRESS(), \ 1215 #define rtems_record_caller_arg_10( \ 1227 _Record_Caller_arg_10( \ 1228 RTEMS_RETURN_ADDRESS(), \ 1249 #define rtems_record_entry( event ) \ 1250 rtems_record_produce( event, (rtems_record_data) RTEMS_RETURN_ADDRESS() ) 1261 #define rtems_record_entry_1( event, data ) \ 1262 rtems_record_produce_2( \ 1264 (rtems_record_data) RTEMS_RETURN_ADDRESS(), \ 1265 RTEMS_RECORD_ARG_0, \ 1279 #define rtems_record_entry_2( event, data_0, data_1 ) \ 1280 _Record_Entry_2( RTEMS_RETURN_ADDRESS(), event, data_0, data_1 ) 1293 #define rtems_record_entry_3( event, data_0, data_1, data_2 ) \ 1295 RTEMS_RETURN_ADDRESS(), \ 1314 #define rtems_record_entry_4( event, data_0, data_1, data_2, data_3 ) \ 1316 RTEMS_RETURN_ADDRESS(), \ 1337 #define rtems_record_entry_5( \ 1346 RTEMS_RETURN_ADDRESS(), \ 1369 #define rtems_record_entry_6( \ 1379 RTEMS_RETURN_ADDRESS(), \ 1404 #define rtems_record_entry_7( \ 1415 RTEMS_RETURN_ADDRESS(), \ 1442 #define rtems_record_entry_8( \ 1454 RTEMS_RETURN_ADDRESS(), \ 1483 #define rtems_record_entry_9( \ 1496 RTEMS_RETURN_ADDRESS(), \ 1527 #define rtems_record_entry_10( \ 1541 RTEMS_RETURN_ADDRESS(), \ 1563 #define rtems_record_exit( event ) \ 1564 rtems_record_produce( event, (rtems_record_data) RTEMS_RETURN_ADDRESS() ) 1575 #define rtems_record_exit_1( event, data ) \ 1576 rtems_record_produce_2( \ 1578 (rtems_record_data) RTEMS_RETURN_ADDRESS(), \ 1579 RTEMS_RECORD_RETURN_0, \ 1593 #define rtems_record_exit_2( event, data_0, data_1 ) \ 1594 _Record_Entry_2( RTEMS_RETURN_ADDRESS(), event, data_0, data_1 ) 1607 #define rtems_record_exit_3( event, data_0, data_1, data_2 ) \ 1609 RTEMS_RETURN_ADDRESS(), \ 1628 #define rtems_record_exit_4( event, data_0, data_1, data_2, data_3 ) \ 1630 RTEMS_RETURN_ADDRESS(), \ 1651 #define rtems_record_exit_5( \ 1660 RTEMS_RETURN_ADDRESS(), \ 1683 #define rtems_record_exit_6( \ 1693 RTEMS_RETURN_ADDRESS(), \ 1718 #define rtems_record_exit_7( \ 1729 RTEMS_RETURN_ADDRESS(), \ 1756 #define rtems_record_exit_8( \ 1768 RTEMS_RETURN_ADDRESS(), \ 1797 #define rtems_record_exit_9( \ 1810 RTEMS_RETURN_ADDRESS(), \ 1841 #define rtems_record_exit_10( \ 1855 RTEMS_RETURN_ADDRESS(), \ 1885 typedef void ( *rtems_record_drain_visitor )(
1886 const rtems_record_item *items,
1894 rtems_record_drain_visitor visitor,
Constants and Prototypes Related to the Internal Error Handler.
#define CPU_CACHE_LINE_BYTES
Definition: cpu.h:218
void rtems_record_line_arg_4(rtems_record_data data_0, rtems_record_data data_1, rtems_record_data data_2, rtems_record_data data_3)
Generates an RTEMS_RECORD_LINE event and four argument events.
Definition: record-util.c:118
void rtems_record_produce_2(rtems_record_event event_0, rtems_record_data data_0, rtems_record_event event_1, rtems_record_data data_1)
Produces two record items.
Definition: record.c:56
void rtems_record_line_arg_9(rtems_record_data data_0, rtems_record_data data_1, rtems_record_data data_2, rtems_record_data data_3, rtems_record_data data_4, rtems_record_data data_5, rtems_record_data data_6, rtems_record_data data_7, rtems_record_data data_8)
Generates an RTEMS_RECORD_LINE event and nine argument events.
Definition: record-util.c:258
rtems_record_event
The record events.
Definition: recorddata.h:90
RTEMS_INLINE_ROUTINE void rtems_record_prepare_critical(rtems_record_context *context, const Per_CPU_Control *cpu_self)
Prepares to add and commit record items in a critical section with interrupts disabled.
Definition: record.h:501
The control block used to manage each watchdog timer.
Definition: watchdog.h:90
RTEMS_INLINE_ROUTINE void rtems_record_commit_critical(rtems_record_context *context)
Commits a set of record items in a critical section with interrupts disabled.
Definition: record.h:578
#define RTEMS_ALIGNED(_alignment)
Instructs the compiler to enforce the specified alignment.
Definition: basedefs.h:216
void rtems_record_produce_n(const rtems_record_item *items, size_t n)
Produces n record items.
Definition: record.c:71
void rtems_record_produce(rtems_record_event event, rtems_record_data data)
Produces a record item.
Definition: record.c:47
RTEMS_INLINE_ROUTINE void rtems_record_commit(rtems_record_context *context)
Commits a set of record items.
Definition: record.h:592
void rtems_record_line_arg_6(rtems_record_data data_0, rtems_record_data data_1, rtems_record_data data_2, rtems_record_data data_3, rtems_record_data data_4, rtems_record_data data_5)
Generates an RTEMS_RECORD_LINE event and six argument events.
Definition: record-util.c:165
Internal_errors_Source
This type lists the possible sources from which an error can be reported.
Definition: interr.h:47
uint32_t rtems_record_interrupt_disable(void)
Disables interrupts and generates an RTEMS_RECORD_ISR_DISABLE event.
Definition: record-util.c:1215
void rtems_record_line_arg(rtems_record_data data)
Generates an RTEMS_RECORD_LINE event and one argument event.
Definition: record-util.c:73
#define RTEMS_COMPILER_MEMORY_BARRIER()
Definition: basedefs.h:77
void rtems_record_line_arg_2(rtems_record_data data_0, rtems_record_data data_1)
Generates an RTEMS_RECORD_LINE event and two argument events.
Definition: record-util.c:83
void rtems_record_line_arg_7(rtems_record_data data_0, rtems_record_data data_1, rtems_record_data data_2, rtems_record_data data_3, rtems_record_data data_4, rtems_record_data data_5, rtems_record_data data_6)
Generates an RTEMS_RECORD_LINE event and seven argument events.
Definition: record-util.c:193
void rtems_record_line_arg_10(rtems_record_data data_0, rtems_record_data data_1, rtems_record_data data_2, rtems_record_data data_3, rtems_record_data data_4, rtems_record_data data_5, rtems_record_data data_6, rtems_record_data data_7, rtems_record_data data_8, rtems_record_data data_9)
Generates an RTEMS_RECORD_LINE event and ten argument events.
Definition: record-util.c:295
RTEMS_INLINE_ROUTINE void rtems_record_add(rtems_record_context *context, rtems_record_event event, rtems_record_data data)
Adds a record item.
Definition: record.h:552
Per CPU Core Structure.
Definition: percpu.h:347
#define RTEMS_RECORD_TIME_EVENT(time, event)
Builds a time event for the specified time stamp and event.
Definition: recorddata.h:1150
Free-Running Counter and Busy Wait Delay API.
void rtems_record_line_3(rtems_record_event event_0, rtems_record_data data_0, rtems_record_event event_1, rtems_record_data data_1)
Generates an RTEMS_RECORD_LINE event and two extra events.
Definition: record-util.c:55
void rtems_record_line_arg_5(rtems_record_data data_0, rtems_record_data data_1, rtems_record_data data_2, rtems_record_data data_3, rtems_record_data data_4)
Generates an RTEMS_RECORD_LINE event and five argument events.
Definition: record-util.c:140
Constants and Structures Associated with Watchdog Timers.
Used for passing and retrieving registers content to/from real mode interrupt call.
Definition: realmode_int.h:43
Definition: intercom.c:74
Definition: inftrees.h:24
RTEMS_INLINE_ROUTINE void rtems_record_prepare(rtems_record_context *context)
Prepares to add and commit record items.
Definition: record.h:527
void rtems_record_line(void)
Generates an RTEMS_RECORD_LINE event.
Definition: record-util.c:34
void rtems_record_interrupt_enable(uint32_t level)
Restores the previous interrupt level and generates an RTEMS_RECORD_ISR_ENABLE event.
Definition: record-util.c:1232
void rtems_record_drain(rtems_record_drain_visitor visitor, void *arg)
Drains the record items on all processors.
Definition: record.c:172
unsigned long rtems_record_data
The record data integer type.
Definition: recorddata.h:1170
unsigned context
Definition: tlb.h:108
void rtems_record_line_arg_3(rtems_record_data data_0, rtems_record_data data_1, rtems_record_data data_2)
Generates an RTEMS_RECORD_LINE event and three argument events.
Definition: record-util.c:99
void rtems_record_line_arg_8(rtems_record_data data_0, rtems_record_data data_1, rtems_record_data data_2, rtems_record_data data_3, rtems_record_data data_4, rtems_record_data data_5, rtems_record_data data_6, rtems_record_data data_7)
Generates an RTEMS_RECORD_LINE event and eight argument events.
Definition: record-util.c:224
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:66
CPU_Counter_ticks rtems_counter_ticks
Unsigned integer type for counter values.
Definition: counter.h:62
void rtems_record_line_2(rtems_record_event event, rtems_record_data data)
Generates an RTEMS_RECORD_LINE event and an extra event.
Definition: record-util.c:42