option q is to set cpu measurements but it is hardcoded in some places

This commit is contained in:
Laurent THOMAS
2024-09-18 16:02:14 +02:00
parent ba2d7aad18
commit 31f770978c
25 changed files with 114 additions and 140 deletions
+1 -1
View File
@@ -925,7 +925,7 @@ 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)
if (cpu_meas_enabled)
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));
+3 -3
View File
@@ -1460,7 +1460,7 @@ static void *ru_stats_thread(void *param) {
while (!oai_exit) {
sleep(1);
if (opp_enabled) {
if (cpu_meas_enabled) {
if (ru->feprx) print_meas(&ru->ofdm_demod_stats,"feprx_ru",NULL,NULL);
if (ru->feptx_ofdm) print_meas(&ru->ofdm_mod_stats,"feptx_ofdm_ru",NULL,NULL);
@@ -2322,7 +2322,7 @@ void init_RU_proc(RU_t *ru) {
init_feptx_thread(ru, NULL);
}
if (opp_enabled == 1)
if (cpu_meas_enabled)
pthread_create(&ru->ru_stats_thread, NULL, ru_stats_thread, (void *)ru);
}
@@ -2420,7 +2420,7 @@ void kill_RU_proc(RU_t *ru) {
}
}
if (opp_enabled) {
if (cpu_meas_enabled) {
LOG_D(PHY, "Joining ru_stats_thread\n");
pthread_join(ru->ru_stats_thread, NULL);
}
-1
View File
@@ -2264,7 +2264,6 @@ static void *timer_thread( void *param ) {
//double t_diff;
int external_timer = 0;
wait_sync("timer_thread");
opp_enabled = 1;
// first check if we are receiving timing indications
if(NFAPI_MODE==NFAPI_UE_STUB_OFFNET) {
+6 -8
View File
@@ -1040,7 +1040,7 @@ void *ru_stats_thread(void *param) {
while (!oai_exit) {
sleep(1);
if (opp_enabled == 1) {
if (cpu_meas_enabled) {
if (ru->feprx) print_meas(&ru->ofdm_demod_stats,"feprx (all ports)",NULL,NULL);
if (ru->feptx_ofdm) {
@@ -1142,8 +1142,7 @@ void *ru_thread( void *param ) {
int slot = fp->slots_per_frame-1;
int frame = 1023;
char threadname[40];
int initial_wait=0;
int opp_enabled0 = opp_enabled;
int initial_wait = 0;
#ifndef OAI_FHI72
bool rx_tti_busy[RU_RX_SLOT_DEPTH] = {false};
@@ -1231,7 +1230,7 @@ void *ru_thread( void *param ) {
else LOG_I(PHY,"RU %d rf device ready\n",ru->idx);
} else LOG_I(PHY,"RU %d no rf device\n",ru->idx);
LOG_I(PHY,"RU %d RF started opp_enabled %d\n",ru->idx,opp_enabled);
LOG_I(PHY, "RU %d RF started cpu_meas_enabled %d\n", ru->idx, cpu_meas_enabled);
// start trx write thread
if(usrp_tx_thread == 1) {
if (ru->start_write_thread) {
@@ -1294,8 +1293,7 @@ void *ru_thread( void *param ) {
continue;
}
if (proc->frame_rx>=300) {
initial_wait=0;
opp_enabled = opp_enabled0;
initial_wait = 0;
}
if (initial_wait == 0 && ru->rx_fhaul.trials > 1000) {
reset_meas(&ru->rx_fhaul);
@@ -1460,7 +1458,7 @@ void init_RU_proc(RU_t *ru) {
if(emulate_rf)
threadCreate( &proc->pthread_emulateRF, emulatedRF_thread, (void *)proc, "emulateRF", -1, OAI_PRIORITY_RT );
if (opp_enabled == 1)
if (cpu_meas_enabled)
threadCreate(&ru->ru_stats_thread, ru_stats_thread, (void *)ru, "ru_stats", -1, OAI_PRIORITY_RT);
LOG_I(PHY, "Initialized RU proc %d (%s,%s),\n", ru->idx, NB_functions[ru->function], NB_timing[ru->if_timing]);
}
@@ -1485,7 +1483,7 @@ void kill_NR_RU_proc(int inst) {
pthread_mutex_unlock( &proc->mutex_fep[0] );
pthread_join(proc->pthread_FH, NULL);
if (opp_enabled) {
if (cpu_meas_enabled) {
LOG_D(PHY, "Joining ru_stats_thread\n");
pthread_join(ru->ru_stats_thread, NULL);
}
+1 -1
View File
@@ -631,7 +631,7 @@ int main( int argc, char **argv ) {
set_taus_seed (0);
printf("configuring for RAU/RRU\n");
if (opp_enabled ==1) {
if (cpu_meas_enabled) {
reset_opp_meas();
}
+1 -1
View File
@@ -166,7 +166,7 @@ extern int usrp_tx_thread;
{"CO" , CONFIG_HLP_ULF, 0, .iptr=&(uplink_frequency_offset[0][0]), .defintval=0, TYPE_INT, 0}, \
{"a" , CONFIG_HLP_CHOFF, 0, .iptr=&CHAIN_OFFSET, .defintval=0, TYPE_INT, 0}, \
{"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, .uptr=&do_forms, .defintval=0, TYPE_UINT, 0}, \
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, .iptr=&opp_enabled, .defintval=0, TYPE_INT, 0}, \
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, .iptr=&cpu_meas_enabled, .defintval=0, TYPE_INT, 0}, \
{"numerology" , CONFIG_HLP_NUMEROLOGY, 0, .iptr=&NUMEROLOGY, .defintval=1, TYPE_INT, 0}, \
{"band" , CONFIG_HLP_BAND, 0, .iptr=&BAND, .defintval=78, TYPE_INT, 0}, \
{"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, .iptr=&EMULATE_RF, .defintval=0, TYPE_INT, 0}, \