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 ];
55 unsigned int item_count;
68void _Record_Initialize(
void );
70void _Record_Interrupt_initialize(
void );
72bool _Record_Thread_create(
77void _Record_Thread_start(
82void _Record_Thread_restart(
87void _Record_Thread_delete(
92void _Record_Thread_switch(
101void _Record_Fatal_dump_base64(
103 bool always_set_to_false,
104 Internal_errors_t
code
107void _Record_Fatal_dump_base64_zlib(
109 bool always_set_to_false,
110 Internal_errors_t
code
113void _Record_Thread_terminate(
117static inline unsigned int _Record_Index(
127 return _Atomic_Load_uint( &
control->head, ATOMIC_ORDER_RELAXED );
135static inline bool _Record_Is_overflow(
141 return head - tail >=
control->mask + 1U;
144static inline unsigned int _Record_Capacity(
150 return ( tail - head - 1U ) &
control->mask;
155 return rtems_counter_read();
161 rtems_record_item Version;
162 rtems_record_item Processor_maximum;
163 rtems_record_item Count;
164 rtems_record_item Frequency;
165 rtems_record_item Info[64];
170size_t _Record_String_to_items(
174 rtems_record_item *items,
178void _Record_Caller(
void *return_address );
180void _Record_Caller_3(
181 void *return_address,
186void _Record_Caller_4(
187 void *return_address,
196void _Record_Caller_arg_2(
197 void *return_address,
202void _Record_Caller_arg_3(
203 void *return_address,
209void _Record_Caller_arg_4(
210 void *return_address,
217void _Record_Caller_arg_5(
218 void *return_address,
226void _Record_Caller_arg_6(
227 void *return_address,
236void _Record_Caller_arg_7(
237 void *return_address,
247void _Record_Caller_arg_8(
248 void *return_address,
259void _Record_Caller_arg_9(
260 void *return_address,
272void _Record_Caller_arg_10(
273 void *return_address,
287 void *return_address,
294 void *return_address,
302 void *return_address,
311 void *return_address,
321 void *return_address,
332 void *return_address,
344 void *return_address,
357 void *return_address,
370void _Record_Entry_10(
371 void *return_address,
386 void *return_address,
393 void *return_address,
401 void *return_address,
410 void *return_address,
420 void *return_address,
431 void *return_address,
443 void *return_address,
456 void *return_address,
470 void *return_address,
503static inline void rtems_record_prepare_critical(
514 head = _Record_Head(
control );
536 _CPU_ISR_Disable( level );
540 cpu_self = _Per_CPU_Get();
543 head = _Record_Head(
control );
554static inline void rtems_record_add(
561 rtems_record_item *item;
569 item->event =
context->now | event;
596 rtems_record_commit_critical(
context );
598 _CPU_ISR_Enable(
context->level );
631 const rtems_record_item *items,
889#define rtems_record_caller() _Record_Caller( RTEMS_RETURN_ADDRESS() )
904#define rtems_record_caller_3( event, data ) \
905 _Record_Caller_3( RTEMS_RETURN_ADDRESS(), event, data )
922#define rtems_record_caller_4( event_0, data_0, event_1, data_1 ) \
924 RTEMS_RETURN_ADDRESS(), \
943#define rtems_record_caller_arg( data ) \
944 _Record_Caller_arg( RTEMS_RETURN_ADDRESS(), data )
959#define rtems_record_caller_arg_2( data_0, data_1 ) \
960 _Record_Caller_arg_2( \
961 RTEMS_RETURN_ADDRESS(), \
980#define rtems_record_caller_arg_3( data_0, data_1, data_2 ) \
981 _Record_Caller_arg_3( \
982 RTEMS_RETURN_ADDRESS(), \
1003#define rtems_record_caller_arg_4( data_0, data_1, data_2, data_3 ) \
1004 _Record_Caller_arg_4( \
1005 RTEMS_RETURN_ADDRESS(), \
1028#define rtems_record_caller_arg_5( data_0, data_1, data_2, data_3, data_4 ) \
1029 _Record_Caller_arg_5( \
1030 RTEMS_RETURN_ADDRESS(), \
1055#define rtems_record_caller_arg_6( \
1063 _Record_Caller_arg_6( \
1064 RTEMS_RETURN_ADDRESS(), \
1091#define rtems_record_caller_arg_7( \
1100 _Record_Caller_arg_7( \
1101 RTEMS_RETURN_ADDRESS(), \
1130#define rtems_record_caller_arg_8( \
1140 _Record_Caller_arg_8( \
1141 RTEMS_RETURN_ADDRESS(), \
1172#define rtems_record_caller_arg_9( \
1183 _Record_Caller_arg_9( \
1184 RTEMS_RETURN_ADDRESS(), \
1217#define rtems_record_caller_arg_10( \
1229 _Record_Caller_arg_10( \
1230 RTEMS_RETURN_ADDRESS(), \
1251#define rtems_record_entry( event ) \
1252 rtems_record_produce( event, (rtems_record_data) RTEMS_RETURN_ADDRESS() )
1263#define rtems_record_entry_1( event, data ) \
1264 rtems_record_produce_2( \
1266 (rtems_record_data) RTEMS_RETURN_ADDRESS(), \
1267 RTEMS_RECORD_ARG_0, \
1281#define rtems_record_entry_2( event, data_0, data_1 ) \
1282 _Record_Entry_2( RTEMS_RETURN_ADDRESS(), event, data_0, data_1 )
1295#define rtems_record_entry_3( event, data_0, data_1, data_2 ) \
1297 RTEMS_RETURN_ADDRESS(), \
1316#define rtems_record_entry_4( event, data_0, data_1, data_2, data_3 ) \
1318 RTEMS_RETURN_ADDRESS(), \
1339#define rtems_record_entry_5( \
1348 RTEMS_RETURN_ADDRESS(), \
1371#define rtems_record_entry_6( \
1381 RTEMS_RETURN_ADDRESS(), \
1406#define rtems_record_entry_7( \
1417 RTEMS_RETURN_ADDRESS(), \
1444#define rtems_record_entry_8( \
1456 RTEMS_RETURN_ADDRESS(), \
1485#define rtems_record_entry_9( \
1498 RTEMS_RETURN_ADDRESS(), \
1529#define rtems_record_entry_10( \
1543 RTEMS_RETURN_ADDRESS(), \
1565#define rtems_record_exit( event ) \
1566 rtems_record_produce( event, (rtems_record_data) RTEMS_RETURN_ADDRESS() )
1577#define rtems_record_exit_1( event, data ) \
1578 rtems_record_produce_2( \
1580 (rtems_record_data) RTEMS_RETURN_ADDRESS(), \
1581 RTEMS_RECORD_RETURN_0, \
1595#define rtems_record_exit_2( event, data_0, data_1 ) \
1596 _Record_Entry_2( RTEMS_RETURN_ADDRESS(), event, data_0, data_1 )
1609#define rtems_record_exit_3( event, data_0, data_1, data_2 ) \
1611 RTEMS_RETURN_ADDRESS(), \
1630#define rtems_record_exit_4( event, data_0, data_1, data_2, data_3 ) \
1632 RTEMS_RETURN_ADDRESS(), \
1653#define rtems_record_exit_5( \
1662 RTEMS_RETURN_ADDRESS(), \
1685#define rtems_record_exit_6( \
1695 RTEMS_RETURN_ADDRESS(), \
1720#define rtems_record_exit_7( \
1731 RTEMS_RETURN_ADDRESS(), \
1758#define rtems_record_exit_8( \
1770 RTEMS_RETURN_ADDRESS(), \
1799#define rtems_record_exit_9( \
1812 RTEMS_RETURN_ADDRESS(), \
1843#define rtems_record_exit_10( \
1857 RTEMS_RETURN_ADDRESS(), \
1887typedef void ( *rtems_record_drain_visitor )(
1888 const rtems_record_item *items,
1896 rtems_record_drain_visitor visitor,
This header file defines the Free-Running Counter and Busy Wait Delay API.
This header file provides interfaces of the Watchdog Handler which are used by the implementation and...
#define RTEMS_ALIGNED(_alignment)
Instructs the compiler in a declaration or definition to enforce the alignment.
Definition: basedefs.h:157
#define RTEMS_COMPILER_MEMORY_BARRIER()
This macro forbids the compiler to reorder read and write commands around it.
Definition: basedefs.h:258
#define RTEMS_ZERO_LENGTH_ARRAY
This constant represents the element count of a zero-length array.
Definition: basedefs.h:1032
CPU_Counter_ticks rtems_counter_ticks
Unsigned integer type for counter values.
Definition: counter.h:76
void rtems_record_line_arg(rtems_record_data data)
Generates an RTEMS_RECORD_LINE event and one argument event.
Definition: record-util.c:73
void rtems_record_produce(rtems_record_event event, rtems_record_data data)
Produces a record item.
Definition: record.c:47
#define RTEMS_RECORD_TIME_EVENT(time, event)
Builds a time event for the specified time stamp and event.
Definition: recorddata.h:1150
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
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_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
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_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
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
void rtems_record_produce_n(const rtems_record_item *items, size_t n)
Produces n record items.
Definition: record.c:71
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
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
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_drain(rtems_record_drain_visitor visitor, void *arg)
Drains the record items on all processors.
Definition: record.c:172
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_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
unsigned long rtems_record_data
The record data integer type.
Definition: recorddata.h:1170
rtems_record_event
The record events.
Definition: recorddata.h:90
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_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_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(void)
Generates an RTEMS_RECORD_LINE event.
Definition: record-util.c:34
Internal_errors_Source
This type lists the possible sources from which an error can be reported.
Definition: interr.h:63
This header file provides the interfaces of the Atomic Operations.
This header file provides the interfaces of the Internal Error Handler.
rtems_termios_device_context * context
Definition: console-config.c:62
This header file provides the interfaces of the Per-CPU Information.
Per CPU Core Structure.
Definition: percpu.h:384
Used for passing and retrieving registers content to/from real mode interrupt call.
Definition: realmode_int.h:43
The control block used to manage each watchdog timer.
Definition: watchdog.h:109
Definition: inftrees.h:24
Definition: intercom.c:87