diff --git a/common/utils/itti/intertask_interface.c b/common/utils/itti/intertask_interface.c index 530e6a9e7e3c6a747ae09978faf19c85751ab0d3..1545b62bee2aae7a6a5588981f49a1581772aaec 100644 --- a/common/utils/itti/intertask_interface.c +++ b/common/utils/itti/intertask_interface.c @@ -764,7 +764,11 @@ static void *itti_rt_relay_thread(void *arg) while (itti_desc.running) { - usleep (100); + usleep (200); // Poll for messages a little more than 2 time by slot to get a small latency between RT and other tasks + +#if defined(OAI_EMU) || defined(RTAI) + vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_RELAY_THREAD, VCD_FUNCTION_IN); +#endif /* Checks for all non real time tasks if they have pending messages */ for (thread_id = THREAD_FIRST; thread_id < itti_desc.thread_max; thread_id++) @@ -785,6 +789,10 @@ static void *itti_rt_relay_thread(void *arg) } } } + +#if defined(OAI_EMU) || defined(RTAI) + vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_RELAY_THREAD, VCD_FUNCTION_OUT); +#endif } return NULL; } diff --git a/openair2/UTIL/LOG/vcd_signal_dumper.c b/openair2/UTIL/LOG/vcd_signal_dumper.c index f178cf822f7bf1b6b810d160a139707c117a91fc..25916ec5630d278f5a20d042cf64e8bc70e4be69 100644 --- a/openair2/UTIL/LOG/vcd_signal_dumper.c +++ b/openair2/UTIL/LOG/vcd_signal_dumper.c @@ -165,6 +165,7 @@ const char* eurecomFunctionsNames[] = { "itti_enqueue_message", "itti_dump_enqueue_message", "itti_dump_enqueue_message_malloc", + "itti_relay_thread", "test" }; @@ -285,8 +286,8 @@ inline static uint32_t vcd_get_write_index(void) /* Wrap index */ write_index &= VCD_FIFO_MASK; - /* Check FIFO overflow */ - DevCheck((read_index = vcd_fifo.read_index, ((write_index + 1) & VCD_FIFO_MASK) != read_index), write_index, read_index, 0); + /* Check FIFO overflow (increase VCD_FIFO_NB_ELEMENTS if this assert is triggered) */ + DevCheck((read_index = vcd_fifo.read_index, ((write_index + 1) & VCD_FIFO_MASK) != read_index), write_index, read_index, VCD_FIFO_NB_ELEMENTS); return write_index; } @@ -314,6 +315,7 @@ void *vcd_dumper_thread_rt(void *args) data_ready_wait = 0; while (data->module == VCD_SIGNAL_DUMPER_MODULE_FREE) { + /* Check wait delay (increase VCD_MAX_WAIT_DELAY if this assert is triggered and that no thread is locked) */ DevCheck(data_ready_wait < VCD_MAX_WAIT_DELAY, data_ready_wait, VCD_MAX_WAIT_DELAY, 0); /* data is not yet ready, wait for it to be completed */ diff --git a/openair2/UTIL/LOG/vcd_signal_dumper.h b/openair2/UTIL/LOG/vcd_signal_dumper.h index 94f7af0af01513eeb938110b38747947c88d7fac..800be262b2d0ec64c90b0a3fc160f109943d537e 100644 --- a/openair2/UTIL/LOG/vcd_signal_dumper.h +++ b/openair2/UTIL/LOG/vcd_signal_dumper.h @@ -139,6 +139,7 @@ typedef enum VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_ENQUEUE_MESSAGE, VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE, VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE_MALLOC, + VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_RELAY_THREAD, VCD_SIGNAL_DUMPER_FUNCTIONS_TEST, VCD_SIGNAL_DUMPER_FUNCTIONS_LAST, VCD_SIGNAL_DUMPER_FUNCTIONS_END = VCD_SIGNAL_DUMPER_FUNCTIONS_LAST,