Added a VCD log point for ITTI relay thread.
tuned ITTI relay thread polling delay to 200 micro-seconds to have no RT tasks reacting within the same slot most of the time. git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4740 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -764,7 +764,11 @@ static void *itti_rt_relay_thread(void *arg)
|
|||||||
|
|
||||||
while (itti_desc.running)
|
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 */
|
/* 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++)
|
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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,6 +165,7 @@ const char* eurecomFunctionsNames[] = {
|
|||||||
"itti_enqueue_message",
|
"itti_enqueue_message",
|
||||||
"itti_dump_enqueue_message",
|
"itti_dump_enqueue_message",
|
||||||
"itti_dump_enqueue_message_malloc",
|
"itti_dump_enqueue_message_malloc",
|
||||||
|
"itti_relay_thread",
|
||||||
"test"
|
"test"
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -285,8 +286,8 @@ inline static uint32_t vcd_get_write_index(void)
|
|||||||
/* Wrap index */
|
/* Wrap index */
|
||||||
write_index &= VCD_FIFO_MASK;
|
write_index &= VCD_FIFO_MASK;
|
||||||
|
|
||||||
/* Check FIFO overflow */
|
/* 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, 0);
|
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;
|
return write_index;
|
||||||
}
|
}
|
||||||
@@ -314,6 +315,7 @@ void *vcd_dumper_thread_rt(void *args)
|
|||||||
data_ready_wait = 0;
|
data_ready_wait = 0;
|
||||||
while (data->module == VCD_SIGNAL_DUMPER_MODULE_FREE)
|
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);
|
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 */
|
/* data is not yet ready, wait for it to be completed */
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ typedef enum
|
|||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_ENQUEUE_MESSAGE,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_ENQUEUE_MESSAGE,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE_MALLOC,
|
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_TEST,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_LAST,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_LAST,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_END = VCD_SIGNAL_DUMPER_FUNCTIONS_LAST,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_END = VCD_SIGNAL_DUMPER_FUNCTIONS_LAST,
|
||||||
|
|||||||
Reference in New Issue
Block a user