stats display with 5G flag

This commit is contained in:
laurent
2023-02-15 13:50:44 +01:00
parent 2de56bf324
commit ef1d5079f2
13 changed files with 137 additions and 236 deletions
+39 -52
View File
@@ -313,7 +313,6 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
return(0);
}
static void *L1_thread_tx(void *param) {
L1_proc_t *eNB_proc = (L1_proc_t *)param;
L1_rxtx_proc_t *proc = &eNB_proc->L1_proc_tx;
@@ -811,35 +810,19 @@ static void *eNB_thread_prach_br( void *param ) {
return &eNB_thread_prach_status;
}
extern void init_td_thread(PHY_VARS_eNB *);
extern void init_te_thread(PHY_VARS_eNB *);
extern void kill_td_thread(PHY_VARS_eNB *);
extern void kill_te_thread(PHY_VARS_eNB *);
static void print_opp_meas(PHY_VARS_eNB *eNB);
static void reset_opp_meas(PHY_VARS_eNB *eNB);
static void *process_stats_thread(void *param) {
PHY_VARS_eNB *eNB = (PHY_VARS_eNB *)param;
wait_sync("process_stats_thread");
reset_opp_meas(eNB);
while (!oai_exit) {
sleep(1);
if (opp_enabled == 1) {
if ( eNB->ulsch_decoding_stats.trials>0)
print_meas(&eNB->ulsch_decoding_stats,"ulsch_decoding",NULL,NULL);
if (eNB->dlsch_encoding_stats.trials >0) {
print_meas(&eNB->dlsch_turbo_encoding_preperation_stats,"dlsch_coding_crc",NULL,NULL);
print_meas(&eNB->dlsch_turbo_encoding_segmentation_stats,"dlsch_segmentation",NULL,NULL);
print_meas(&eNB->dlsch_encoding_stats,"dlsch_encoding",NULL,NULL);
print_meas(&eNB->dlsch_turbo_encoding_stats,"turbo_encoding",NULL,NULL);
print_meas(&eNB->dlsch_interleaving_stats,"turbo_interleaving",NULL,NULL);
print_meas(&eNB->dlsch_rate_matching_stats,"turbo_rate_matching",NULL,NULL);
}
print_meas(&eNB->dlsch_modulation_stats,"dlsch_modulation",NULL,NULL);
}
print_opp_meas(eNB);
if (RC.mac)
lte_dump_mac_stats(RC.mac[0], stdout);
if (time(NULL) % 10)
reset_opp_meas(eNB);
}
return(NULL);
@@ -918,11 +901,6 @@ void init_eNB_proc(int inst) {
pthread_cond_init( &proc->cond_prach_br, NULL);
pthread_attr_init( &proc->attr_prach_br);
if(get_thread_worker_conf() == WORKER_ENABLE) {
init_te_thread(eNB);
init_td_thread(eNB);
}
LOG_I(PHY,"eNB->single_thread_flag:%d\n", eNB->single_thread_flag);
if ((get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT) && NFAPI_MODE!=NFAPI_MODE_VNF) {
@@ -954,8 +932,10 @@ void init_eNB_proc(int inst) {
AssertFatal(proc->instance_cnt_prach == -1,"instance_cnt_prach = %d\n",proc->instance_cnt_prach);
if (opp_enabled == 1) pthread_create(&proc->process_stats_thread,NULL,process_stats_thread,(void *)eNB);
pthread_create(&proc->L1_stats_thread,NULL,L1_stats_thread,(void*)eNB);
if (opp_enabled == 1)
threadCreate(&proc->process_stats_thread, process_stats_thread, (void *)eNB, "opp stats", -1, sched_get_priority_min(SCHED_OAI));
if (!IS_SOFTMODEM_NOSTATS_BIT)
threadCreate(&proc->L1_stats_thread, L1_stats_thread, (void *)eNB, "L1 stats", -1, sched_get_priority_min(SCHED_OAI));
}
//for multiple CCs: setup master and slaves
@@ -997,11 +977,6 @@ void kill_eNB_proc(int inst) {
L1_proc = &proc->L1_proc;
L1_proc_tx = &proc->L1_proc_tx;
if(get_thread_worker_conf() == WORKER_ENABLE) {
kill_td_thread(eNB);
kill_te_thread(eNB);
}
LOG_I(PHY, "Killing TX CC_id %d inst %d\n", CC_id, inst );
if ((get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT || get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) && NFAPI_MODE!=NFAPI_MODE_VNF) {
@@ -1060,30 +1035,43 @@ void kill_eNB_proc(int inst) {
}
}
void reset_opp_meas(void) {
int sfn;
static void reset_opp_meas(PHY_VARS_eNB *eNB)
{
reset_meas(&softmodem_stats_mt);
reset_meas(&softmodem_stats_hw);
for (sfn=0; sfn < 10; sfn++) {
reset_meas(&softmodem_stats_rxtx_sf);
reset_meas(&softmodem_stats_rx_sf);
}
reset_meas(&softmodem_stats_rxtx_sf);
reset_meas(&softmodem_stats_rx_sf);
reset_meas(&eNB->ulsch_decoding_stats);
reset_meas(&eNB->dlsch_turbo_encoding_preperation_stats);
reset_meas(&eNB->dlsch_turbo_encoding_segmentation_stats);
reset_meas(&eNB->dlsch_encoding_stats);
reset_meas(&eNB->dlsch_turbo_encoding_stats);
reset_meas(&eNB->dlsch_interleaving_stats);
reset_meas(&eNB->dlsch_rate_matching_stats);
reset_meas(&eNB->dlsch_modulation_stats);
}
void print_opp_meas(void) {
int sfn=0;
static void print_opp_meas(PHY_VARS_eNB *eNB)
{
print_meas(&softmodem_stats_mt, "Main ENB Thread", NULL, NULL);
print_meas(&softmodem_stats_hw, "HW Acquisation", NULL, NULL);
for (sfn=0; sfn < 10; sfn++) {
print_meas(&softmodem_stats_rxtx_sf,"[eNB][total_phy_proc_rxtx]",NULL, NULL);
print_meas(&softmodem_stats_rx_sf,"[eNB][total_phy_proc_rx]",NULL,NULL);
}
}
if (eNB->ulsch_decoding_stats.trials > 0)
print_meas(&eNB->ulsch_decoding_stats, "ulsch_decoding", NULL, NULL);
if (eNB->dlsch_encoding_stats.trials > 0) {
print_meas(&eNB->dlsch_turbo_encoding_preperation_stats, "dlsch_coding_crc", NULL, NULL);
print_meas(&eNB->dlsch_turbo_encoding_segmentation_stats, "dlsch_segmentation", NULL, NULL);
print_meas(&eNB->dlsch_encoding_stats, "dlsch_encoding", NULL, NULL);
print_meas(&eNB->dlsch_turbo_encoding_stats, "turbo_encoding", NULL, NULL);
print_meas(&eNB->dlsch_interleaving_stats, "turbo_interleaving", NULL, NULL);
print_meas(&eNB->dlsch_rate_matching_stats, "turbo_rate_matching", NULL, NULL);
}
print_meas(&eNB->dlsch_modulation_stats, "dlsch_modulation", NULL, NULL);
}
void free_transport(PHY_VARS_eNB *eNB) {
for (int i=0; i<NUMBER_OF_DLSCH_MAX; i++) {
@@ -1279,7 +1267,6 @@ void init_eNB(int single_thread_flag,
eNB->prach_energy_counter = 0;
}
}
LOG_I(PHY,"[lte-softmodem.c] eNB structure allocated\n");
}
+12 -11
View File
@@ -2335,17 +2335,18 @@ void init_RU_proc(RU_t *ru) {
init_feptx_thread(ru, NULL);
}
if (opp_enabled == 1) pthread_create(&ru->ru_stats_thread,NULL,ru_stats_thread,(void *)ru);
/*
if (ru->function == eNodeB_3GPP) {
usleep(10000);
LOG_I(PHY, "Signaling main thread that RU %d (is_slave %d,send_dmrs %d) is ready in state %s\n",ru->idx,ru->is_slave,ru->generate_dmrs_sync,ru_states[ru->state]);
AssertFatal((ret=pthread_mutex_lock(ru->ru_mutex))==0,"mutex_lock returns %d\n",ret);
*ru->ru_mask &= ~(1<<ru->idx);
pthread_cond_signal(ru->ru_cond);
AssertFatal((ret=pthread_mutex_unlock(ru->ru_mutex))==0,"mutex_unlock returns %d\n",ret);
}
*/
if (opp_enabled == 1)
pthread_create(&ru->ru_stats_thread, NULL, ru_stats_thread, (void *)ru);
/*
if (ru->function == eNodeB_3GPP) {
usleep(10000);
LOG_I(PHY, "Signaling main thread that RU %d (is_slave %d,send_dmrs %d) is ready in state %s\n",ru->idx,ru->is_slave,ru->generate_dmrs_sync,ru_states[ru->state]);
AssertFatal((ret=pthread_mutex_lock(ru->ru_mutex))==0,"mutex_lock returns %d\n",ret);
*ru->ru_mask &= ~(1<<ru->idx);
pthread_cond_signal(ru->ru_cond);
AssertFatal((ret=pthread_mutex_unlock(ru->ru_mutex))==0,"mutex_unlock returns %d\n",ret);
}
*/
}
-8
View File
@@ -156,10 +156,6 @@ void sendFs6Ulharq(enum pckType type, int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI *
RU_t **RCconfig_RU(int nb_RU,int nb_L1_inst,PHY_VARS_eNB ***eNB,uint64_t *ru_mask,pthread_mutex_t *ru_mutex,pthread_cond_t *ru_cond);
extern void reset_opp_meas(void);
extern void print_opp_meas(void);
RU_t **RCconfig_RU(int nb_RU,int nb_L1_inst,PHY_VARS_eNB ***eNB,uint64_t *ru_mask,pthread_mutex_t *ru_mutex,pthread_cond_t *ru_cond);
int transmission_mode=1;
@@ -452,10 +448,6 @@ int main ( int argc, char **argv )
set_taus_seed (0);
printf("configuring for RAU/RRU\n");
if (opp_enabled ==1) {
reset_opp_meas();
}
cpuf=get_cpu_freq_GHz();
printf("ITTI init, useMME: %i\n",EPC_MODE_ENABLED);
itti_init(TASK_MAX, tasks_info);
-8
View File
@@ -179,14 +179,6 @@ extern void init_UE(int nb_inst,
extern void init_thread(int sched_runtime, int sched_deadline, int sched_fifo, cpu_set_t *cpuset, char *name);
extern void reset_opp_meas(void);
extern void print_opp_meas(void);
extern void init_td_thread(PHY_VARS_eNB *);
extern void init_te_thread(PHY_VARS_eNB *);
extern void kill_td_thread(PHY_VARS_eNB *);
extern void kill_te_thread(PHY_VARS_eNB *);
extern void init_ocm(void);
extern void init_ue_devices(PHY_VARS_UE *);