28 #ifndef _RTEMS_RECORD_H 29 #define _RTEMS_RECORD_H 31 #include "recorddata.h" 34 #include <rtems/score/cpu.h> 35 #include <rtems/score/percpudata.h> 50 rtems_record_item Header[ 3 ];
51 rtems_record_item Items[ RTEMS_ZERO_LENGTH_ARRAY ];
57 struct Record_Configured_control Record_Configured_control;
68 extern const unsigned int _Record_Item_count;
70 void _Record_Initialize(
void );
72 bool _Record_Thread_create(
77 void _Record_Thread_start(
82 void _Record_Thread_restart(
87 void _Record_Thread_delete(
92 void _Record_Thread_switch(
101 void _Record_Thread_terminate(
105 #define RECORD_EXTENSION \ 107 _Record_Thread_create, \ 108 _Record_Thread_start, \ 109 _Record_Thread_restart, \ 110 _Record_Thread_delete, \ 111 _Record_Thread_switch, \ 112 _Record_Thread_begin, \ 113 _Record_Thread_exitted, \ 115 _Record_Thread_terminate \ 123 return index & control->mask;
128 return _Atomic_Load_uint( &control->head, ATOMIC_ORDER_RELAXED );
133 return control->tail;
137 const Record_Control *control,
142 return head - tail >= control->mask + 1U;
146 const Record_Control *control,
151 return ( tail - head - 1U ) & control->mask;
156 return rtems_counter_read();
162 rtems_record_item Version;
163 rtems_record_item Processor_maximum;
164 rtems_record_item Count;
165 rtems_record_item Frequency;
191 Record_Control *control;
196 context->level = level;
197 cpu_self = _Per_CPU_Get();
198 control = cpu_self->record;
199 context->control = control;
200 head = _Record_Head( control );
201 context->head = head;
217 Record_Control *control;
218 rtems_record_item *item;
221 control = context->control;
222 head = context->head;
223 item = &control->Items[ _Record_Index( control, head ) ];
224 context->head = head + 1;
226 item->event = context->now | event;
238 &context->control->head,
275 const rtems_record_item *items,
279 typedef void ( *rtems_record_drain_visitor )(
280 const rtems_record_item *items,
#define PER_CPU_DATA_ITEM_DECLARE(type, item)
Declares a per-CPU item of the specified type.
Definition: percpudata.h:49
#define CPU_CACHE_LINE_BYTES
Definition: cpu.h:218
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
Watchdog_Interval rtems_interval
Used to manage and manipulate intervals specified by clock ticks.
Definition: types.h:127
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:65
rtems_record_event
The record events.
Definition: recorddata.h:88
The control block used to manage each watchdog timer.
Definition: watchdog.h:87
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:235
void rtems_record_server(uint16_t port, rtems_interval period)
Runs a record TCP server loop.
Definition: record-server.c:168
ssize_t rtems_record_writev(int fd, bool *written)
Drains the record items on all processors an writes them to the file descriptor.
Definition: record-server.c:74
rtems_status_code
Classic API Status.
Definition: status.h:43
#define rtems_interrupt_local_enable(_isr_cookie)
This macro restores the previous interrupt level on the current processor.
Definition: intr.h:148
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:211
Per CPU Core Structure.
Definition: percpu.h:290
Classic Task Manager API.
#define RTEMS_RECORD_TIME_EVENT(time, event)
Builds a time event for the specified time stamp and event.
Definition: recorddata.h:1148
Free-Running Counter and Busy Wait Delay API.
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
rtems_status_code rtems_record_start_server(rtems_task_priority priority, uint16_t port, rtems_interval period)
Starts a record TCP server task.
Definition: record-server.c:260
RTEMS_INLINE_ROUTINE void rtems_record_prepare(rtems_record_context *context)
Prepares to add and commit record items.
Definition: record.h:187
void rtems_record_drain(rtems_record_drain_visitor visitor, void *arg)
Drains the record items on all processors.
Definition: record.c:91
#define RTEMS_ALIGNED(_alignment)
Instructs the compiler to enforce the specified alignment.
Definition: basedefs.h:204
ISR_Level rtems_interrupt_level
Interrupt level type.
Definition: intr.h:42
unsigned long rtems_record_data
The record data integer type.
Definition: recorddata.h:1168
unsigned context
Definition: tlb.h:108
#define rtems_interrupt_local_disable(_isr_cookie)
This macro disables the interrupts on the current processor.
Definition: intr.h:138
CPU_Counter_ticks rtems_counter_ticks
Unsigned integer type for counter values.
Definition: counter.h:62
uint32_t rtems_task_priority
Definition: tasks.h:54