28#ifndef _RTEMS_RECORD_H
29#define _RTEMS_RECORD_H
31#include "recorddata.h"
34#include <rtems/score/cpu.h>
54 unsigned int item_count;
67void _Record_Initialize(
void );
69void _Record_Interrupt_initialize(
void );
71bool _Record_Thread_create(
76void _Record_Thread_start(
81void _Record_Thread_restart(
86void _Record_Thread_delete(
91void _Record_Thread_switch(
100void _Record_Fatal_dump_base64(
102 bool always_set_to_false,
103 Internal_errors_t
code
106void _Record_Fatal_dump_base64_zlib(
108 bool always_set_to_false,
109 Internal_errors_t
code
112void _Record_Thread_terminate(
116static inline unsigned int _Record_Index(
131 return _Atomic_Fetch_add_uint( &
control->head, 0, ATOMIC_ORDER_ACQUIRE );
133 return _Atomic_Load_uint( &
control->head, ATOMIC_ORDER_ACQUIRE );
142static inline bool _Record_Is_overflow(
148 return head - tail >=
control->mask + 1U;
151static inline unsigned int _Record_Capacity(
157 return ( tail - head - 1U ) &
control->mask;
162 return rtems_counter_read();
168 rtems_record_item Version;
169 rtems_record_item Processor_maximum;
170 rtems_record_item Count;
171 rtems_record_item Frequency;
172 rtems_record_item Info[64];
177size_t _Record_String_to_items(
181 rtems_record_item *items,
185void _Record_Caller(
void *return_address );
187void _Record_Caller_3(
188 void *return_address,
193void _Record_Caller_4(
194 void *return_address,
203void _Record_Caller_arg_2(
204 void *return_address,
209void _Record_Caller_arg_3(
210 void *return_address,
216void _Record_Caller_arg_4(
217 void *return_address,
224void _Record_Caller_arg_5(
225 void *return_address,
233void _Record_Caller_arg_6(
234 void *return_address,
243void _Record_Caller_arg_7(
244 void *return_address,
254void _Record_Caller_arg_8(
255 void *return_address,
266void _Record_Caller_arg_9(
267 void *return_address,
279void _Record_Caller_arg_10(
280 void *return_address,
294 void *return_address,
301 void *return_address,
309 void *return_address,
318 void *return_address,
328 void *return_address,
339 void *return_address,
351 void *return_address,
364 void *return_address,
377void _Record_Entry_10(
378 void *return_address,
393 void *return_address,
400 void *return_address,
408 void *return_address,
417 void *return_address,
427 void *return_address,
438 void *return_address,
450 void *return_address,
463 void *return_address,
477 void *return_address,
510static inline void rtems_record_prepare_critical(
521 head = _Record_Head(
control );
543 _CPU_ISR_Disable( level );
547 cpu_self = _Per_CPU_Get();
550 head = _Record_Head(
control );
561static inline void rtems_record_add(
568 rtems_record_item *item;
576 item->event =
context->now | event;
603 rtems_record_commit_critical(
context );
605 _CPU_ISR_Enable(
context->level );
638 const rtems_record_item *items,
896#define rtems_record_caller() _Record_Caller( RTEMS_RETURN_ADDRESS() )
911#define rtems_record_caller_3( event, data ) \
912 _Record_Caller_3( RTEMS_RETURN_ADDRESS(), event, data )
929#define rtems_record_caller_4( event_0, data_0, event_1, data_1 ) \
931 RTEMS_RETURN_ADDRESS(), \
950#define rtems_record_caller_arg( data ) \
951 _Record_Caller_arg( RTEMS_RETURN_ADDRESS(), data )
966#define rtems_record_caller_arg_2( data_0, data_1 ) \
967 _Record_Caller_arg_2( \
968 RTEMS_RETURN_ADDRESS(), \
987#define rtems_record_caller_arg_3( data_0, data_1, data_2 ) \
988 _Record_Caller_arg_3( \
989 RTEMS_RETURN_ADDRESS(), \
1010#define rtems_record_caller_arg_4( data_0, data_1, data_2, data_3 ) \
1011 _Record_Caller_arg_4( \
1012 RTEMS_RETURN_ADDRESS(), \
1035#define rtems_record_caller_arg_5( data_0, data_1, data_2, data_3, data_4 ) \
1036 _Record_Caller_arg_5( \
1037 RTEMS_RETURN_ADDRESS(), \
1062#define rtems_record_caller_arg_6( \
1070 _Record_Caller_arg_6( \
1071 RTEMS_RETURN_ADDRESS(), \
1098#define rtems_record_caller_arg_7( \
1107 _Record_Caller_arg_7( \
1108 RTEMS_RETURN_ADDRESS(), \
1137#define rtems_record_caller_arg_8( \
1147 _Record_Caller_arg_8( \
1148 RTEMS_RETURN_ADDRESS(), \
1179#define rtems_record_caller_arg_9( \
1190 _Record_Caller_arg_9( \
1191 RTEMS_RETURN_ADDRESS(), \
1224#define rtems_record_caller_arg_10( \
1236 _Record_Caller_arg_10( \
1237 RTEMS_RETURN_ADDRESS(), \
1258#define rtems_record_entry( event ) \
1259 rtems_record_produce( event, (rtems_record_data) RTEMS_RETURN_ADDRESS() )
1270#define rtems_record_entry_1( event, data ) \
1271 rtems_record_produce_2( \
1273 (rtems_record_data) RTEMS_RETURN_ADDRESS(), \
1274 RTEMS_RECORD_ARG_0, \
1288#define rtems_record_entry_2( event, data_0, data_1 ) \
1289 _Record_Entry_2( RTEMS_RETURN_ADDRESS(), event, data_0, data_1 )
1302#define rtems_record_entry_3( event, data_0, data_1, data_2 ) \
1304 RTEMS_RETURN_ADDRESS(), \
1323#define rtems_record_entry_4( event, data_0, data_1, data_2, data_3 ) \
1325 RTEMS_RETURN_ADDRESS(), \
1346#define rtems_record_entry_5( \
1355 RTEMS_RETURN_ADDRESS(), \
1378#define rtems_record_entry_6( \
1388 RTEMS_RETURN_ADDRESS(), \
1413#define rtems_record_entry_7( \
1424 RTEMS_RETURN_ADDRESS(), \
1451#define rtems_record_entry_8( \
1463 RTEMS_RETURN_ADDRESS(), \
1492#define rtems_record_entry_9( \
1505 RTEMS_RETURN_ADDRESS(), \
1536#define rtems_record_entry_10( \
1550 RTEMS_RETURN_ADDRESS(), \
1572#define rtems_record_exit( event ) \
1573 rtems_record_produce( event, (rtems_record_data) RTEMS_RETURN_ADDRESS() )
1584#define rtems_record_exit_1( event, data ) \
1585 rtems_record_produce_2( \
1587 (rtems_record_data) RTEMS_RETURN_ADDRESS(), \
1588 RTEMS_RECORD_RETURN_0, \
1602#define rtems_record_exit_2( event, data_0, data_1 ) \
1603 _Record_Entry_2( RTEMS_RETURN_ADDRESS(), event, data_0, data_1 )
1616#define rtems_record_exit_3( event, data_0, data_1, data_2 ) \
1618 RTEMS_RETURN_ADDRESS(), \
1637#define rtems_record_exit_4( event, data_0, data_1, data_2, data_3 ) \
1639 RTEMS_RETURN_ADDRESS(), \
1660#define rtems_record_exit_5( \
1669 RTEMS_RETURN_ADDRESS(), \
1692#define rtems_record_exit_6( \
1702 RTEMS_RETURN_ADDRESS(), \
1727#define rtems_record_exit_7( \
1738 RTEMS_RETURN_ADDRESS(), \
1765#define rtems_record_exit_8( \
1777 RTEMS_RETURN_ADDRESS(), \
1806#define rtems_record_exit_9( \
1819 RTEMS_RETURN_ADDRESS(), \
1850#define rtems_record_exit_10( \
1864 RTEMS_RETURN_ADDRESS(), \
1993 rtems_record_item *items,
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
rtems_record_fetch_status rtems_record_fetch(rtems_record_fetch_control *control)
Fetches records from the record buffers of the processors.
Definition: record-fetch.c:73
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:1167
rtems_record_fetch_status
This enumeration provides status codes returned by rtems_record_fetch().
Definition: record.h:1948
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_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:1187
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_fetch_initialize(rtems_record_fetch_control *control, rtems_record_item *items, size_t count)
Initializes the record fetch control structure.
Definition: record-fetch.c:61
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
size_t rtems_record_get_item_count_for_fetch(void)
Returns the count of items which allows getting all available items for one processor through one cal...
Definition: record-fetch.c:51
void rtems_record_line(void)
Generates an RTEMS_RECORD_LINE event.
Definition: record-util.c:34
@ RTEMS_RECORD_FETCH_CONTINUE
This enumerator indicates that the current round of record fetches for all configure processors has t...
Definition: record.h:1959
@ RTEMS_RECORD_FETCH_DONE
This enumerator indicates that the current round of record fetches for all configure processors is do...
Definition: record.h:1953
@ RTEMS_RECORD_FETCH_INVALID_ITEM_COUNT
This enumerator indicates that the item count passed to rtems_record_fetch() is invalid.
Definition: record.h:1965
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
This structure controls the record fetching performed by rtems_record_fetch().
Definition: record.h:1899
size_t cpu_todo
This member contains the count of records which need to be fetched from the current processor before ...
Definition: record.h:1929
rtems_record_item * fetched_items
This member references the first item fetched by the last call to rtems_record_fetch().
Definition: record.h:1904
size_t storage_item_count
This member contains the count of items of the array referenced by storage_items.
Definition: record.h:1940
rtems_record_item * storage_items
This member references the item array used to store fetched items.
Definition: record.h:1934
size_t fetched_count
This member contains the count of items fetched by the last call to rtems_record_fetch().
Definition: record.h:1910