L1 perf logging changes
Moved the L1 timing stats logs from stdout to nrL1_stats.log
This commit is contained in:
+41
-27
@@ -110,6 +110,7 @@ time_stats_t softmodem_stats_rx_sf; // total rx time
|
||||
|
||||
//#define TICK_TO_US(ts) (ts.diff)
|
||||
#define TICK_TO_US(ts) (ts.trials==0?0:ts.diff/ts.trials)
|
||||
#define L1STATSSTRLEN 16384
|
||||
|
||||
|
||||
void tx_func(void *param) {
|
||||
@@ -321,9 +322,42 @@ void rx_func(void *param) {
|
||||
);
|
||||
#endif
|
||||
}
|
||||
static void *process_stats_thread(void *param) {
|
||||
static void dump_L1_meas_stats(PHY_VARS_gNB *gNB, RU_t *ru, char *output) {
|
||||
int stroff = 0;
|
||||
stroff += print_meas_log(&gNB->phy_proc_tx, "L1 Tx processing", NULL, NULL, output);
|
||||
stroff += print_meas_log(&gNB->dlsch_encoding_stats, "DLSCH encoding", NULL, NULL, output+stroff);
|
||||
stroff += print_meas_log(&gNB->phy_proc_rx, "L1 Rx processing", NULL, NULL, output+stroff);
|
||||
stroff += print_meas_log(&gNB->ul_indication_stats, "UL Indication", NULL, NULL, output+stroff);
|
||||
stroff += print_meas_log(&gNB->rx_pusch_stats, "PUSCH inner-receiver", NULL, NULL, output+stroff);
|
||||
stroff += print_meas_log(&gNB->ulsch_decoding_stats, "PUSCH decoding", NULL, NULL, output+stroff);
|
||||
if (ru->feprx) stroff += print_meas_log(&ru->ofdm_demod_stats,"feprx",NULL,NULL, output+stroff);
|
||||
|
||||
PHY_VARS_gNB *gNB = (PHY_VARS_gNB *)param;
|
||||
if (ru->feptx_ofdm) {
|
||||
stroff += print_meas_log(&ru->precoding_stats,"feptx_prec",NULL,NULL, output+stroff);
|
||||
stroff += print_meas_log(&ru->txdataF_copy_stats,"txdataF_copy",NULL,NULL, output+stroff);
|
||||
stroff += print_meas_log(&ru->ofdm_mod_stats,"feptx_ofdm",NULL,NULL, output+stroff);
|
||||
stroff += print_meas_log(&ru->ofdm_total_stats,"feptx_total",NULL,NULL, output+stroff);
|
||||
}
|
||||
|
||||
if (ru->fh_north_asynch_in) stroff += print_meas_log(&ru->rx_fhaul,"rx_fhaul",NULL,NULL, output+stroff);
|
||||
|
||||
stroff += print_meas_log(&ru->tx_fhaul,"tx_fhaul",NULL,NULL, output+stroff);
|
||||
|
||||
if (ru->fh_north_out) {
|
||||
stroff += print_meas_log(&ru->compression,"compression",NULL,NULL, output+stroff);
|
||||
stroff += print_meas_log(&ru->transport,"transport",NULL,NULL, output+stroff);
|
||||
}
|
||||
}
|
||||
|
||||
void *nrL1_stats_thread(void *param) {
|
||||
PHY_VARS_gNB *gNB = (PHY_VARS_gNB *)param;
|
||||
RU_t *ru = RC.ru[0];
|
||||
char output[L1STATSSTRLEN];
|
||||
memset(output,0,L1STATSSTRLEN);
|
||||
wait_sync("L1_stats_thread");
|
||||
FILE *fd;
|
||||
fd=fopen("nrL1_stats.log","w");
|
||||
AssertFatal(fd!=NULL,"Cannot open nrL1_stats.log\n");
|
||||
|
||||
reset_meas(&gNB->phy_proc_tx);
|
||||
reset_meas(&gNB->dlsch_encoding_stats);
|
||||
@@ -332,34 +366,16 @@ static void *process_stats_thread(void *param) {
|
||||
reset_meas(&gNB->rx_pusch_stats);
|
||||
reset_meas(&gNB->ulsch_decoding_stats);
|
||||
|
||||
wait_sync("process_stats_thread");
|
||||
|
||||
while(!oai_exit)
|
||||
{
|
||||
sleep(1);
|
||||
print_meas(&gNB->phy_proc_tx, "L1 Tx processing", NULL, NULL);
|
||||
print_meas(&gNB->dlsch_encoding_stats, "DLSCH encoding", NULL, NULL);
|
||||
print_meas(&gNB->phy_proc_rx, "L1 Rx processing", NULL, NULL);
|
||||
print_meas(&gNB->ul_indication_stats, "UL Indication", NULL, NULL);
|
||||
print_meas(&gNB->rx_pusch_stats, "PUSCH inner-receiver", NULL, NULL);
|
||||
print_meas(&gNB->ulsch_decoding_stats, "PUSCH decoding", NULL, NULL);
|
||||
}
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
void *nrL1_stats_thread(void *param) {
|
||||
PHY_VARS_gNB *gNB = (PHY_VARS_gNB *)param;
|
||||
wait_sync("L1_stats_thread");
|
||||
FILE *fd;
|
||||
while (!oai_exit) {
|
||||
sleep(1);
|
||||
fd=fopen("nrL1_stats.log","w");
|
||||
AssertFatal(fd!=NULL,"Cannot open nrL1_stats.log\n");
|
||||
dump_nr_I0_stats(fd,gNB);
|
||||
dump_pusch_stats(fd,gNB);
|
||||
// nr_dump_uci_stats(fd,eNB,eNB->proc.L1_proc_tx.frame_tx);
|
||||
fclose(fd);
|
||||
dump_L1_meas_stats(gNB, ru, output);
|
||||
fprintf(fd,"%s\n",output);
|
||||
fflush(fd);
|
||||
fseek(fd,0,SEEK_SET);
|
||||
}
|
||||
fclose(fd);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
@@ -399,8 +415,6 @@ void init_gNB_Tpool(int inst) {
|
||||
gNB->resp_RU_tx = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
|
||||
initNotifiedFIFO(gNB->resp_RU_tx);
|
||||
|
||||
// Stats measurement thread
|
||||
if(opp_enabled == 1) threadCreate(&proc->process_stats_thread, process_stats_thread,(void *)gNB, "time_meas", -1, OAI_PRIORITY_RT_LOW);
|
||||
threadCreate(&proc->L1_stats_thread,nrL1_stats_thread,(void*)gNB,"L1_stats",-1,OAI_PRIORITY_RT_LOW);
|
||||
|
||||
}
|
||||
|
||||
@@ -1122,37 +1122,6 @@ int setup_RU_buffers(RU_t *ru) {
|
||||
return(0);
|
||||
}
|
||||
|
||||
void *ru_stats_thread(void *param) {
|
||||
RU_t *ru = (RU_t *)param;
|
||||
wait_sync("ru_stats_thread");
|
||||
|
||||
while (!oai_exit) {
|
||||
sleep(1);
|
||||
|
||||
if (opp_enabled == 1) {
|
||||
if (ru->feprx) print_meas(&ru->ofdm_demod_stats,"feprx",NULL,NULL);
|
||||
|
||||
if (ru->feptx_ofdm) {
|
||||
print_meas(&ru->precoding_stats,"feptx_prec",NULL,NULL);
|
||||
print_meas(&ru->txdataF_copy_stats,"txdataF_copy",NULL,NULL);
|
||||
print_meas(&ru->ofdm_mod_stats,"feptx_ofdm",NULL,NULL);
|
||||
print_meas(&ru->ofdm_total_stats,"feptx_total",NULL,NULL);
|
||||
}
|
||||
|
||||
if (ru->fh_north_asynch_in) print_meas(&ru->rx_fhaul,"rx_fhaul",NULL,NULL);
|
||||
|
||||
print_meas(&ru->tx_fhaul,"tx_fhaul",NULL,NULL);
|
||||
|
||||
if (ru->fh_north_out) {
|
||||
print_meas(&ru->compression,"compression",NULL,NULL);
|
||||
print_meas(&ru->transport,"transport",NULL,NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
void ru_tx_func(void *param) {
|
||||
processingData_RU_t *info = (processingData_RU_t *) param;
|
||||
RU_t *ru = info->ru;
|
||||
@@ -1459,7 +1428,6 @@ void init_RU_proc(RU_t *ru) {
|
||||
if (ru->feptx_ofdm) nr_init_feptx_thread(ru);
|
||||
}
|
||||
|
||||
if (opp_enabled == 1) threadCreate(&ru->ru_stats_thread,ru_stats_thread,(void *)ru, "emulateRF", -1, OAI_PRIORITY_RT_LOW);
|
||||
}
|
||||
|
||||
void kill_NR_RU_proc(int inst) {
|
||||
|
||||
Reference in New Issue
Block a user