Merge remote-tracking branch 'origin/tracy-profiler' into integration_2024_w48 (!2951)
Integrate Tracy with NR UE This commit enables the optional use of Tracy for profiling NR UE. See https://github.com/wolfpld/tracy/releases/tag/v0.11.1 for details. More instructions are in the commit.
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include "RRC/NR/MESSAGES/asn1_msg.h"
|
||||
#include "openair1/PHY/TOOLS/phy_scope_interface.h"
|
||||
#include "PHY/MODULATION/nr_modulation.h"
|
||||
#include "instrumentation.h"
|
||||
|
||||
/*
|
||||
* NR SLOT PROCESSING SEQUENCE
|
||||
@@ -480,6 +481,7 @@ static void RU_write(nr_rxtx_thread_data_t *rxtxD, bool sl_tx_action)
|
||||
|
||||
void processSlotTX(void *arg)
|
||||
{
|
||||
TracyCZone(ctx, true);
|
||||
nr_rxtx_thread_data_t *rxtxD = (nr_rxtx_thread_data_t *) arg;
|
||||
const UE_nr_rxtx_proc_t *proc = &rxtxD->proc;
|
||||
PHY_VARS_NR_UE *UE = rxtxD->UE;
|
||||
@@ -592,6 +594,7 @@ void processSlotTX(void *arg)
|
||||
*msgData = newslot;
|
||||
pushNotifiedFIFO(UE->tx_resume_ind_fifo + newslot, newElt);
|
||||
RU_write(rxtxD, sl_tx_action);
|
||||
TracyCZoneEnd(ctx);
|
||||
}
|
||||
|
||||
static int UE_dl_preprocessing(PHY_VARS_NR_UE *UE,
|
||||
@@ -600,6 +603,7 @@ static int UE_dl_preprocessing(PHY_VARS_NR_UE *UE,
|
||||
nr_phy_data_t *phy_data,
|
||||
bool *stats_printed)
|
||||
{
|
||||
TracyCZone(ctx, true);
|
||||
int sampleShift = INT_MAX;
|
||||
NR_DL_FRAME_PARMS *fp = &UE->frame_parms;
|
||||
if (UE->sl_mode == 2)
|
||||
@@ -690,10 +694,12 @@ static int UE_dl_preprocessing(PHY_VARS_NR_UE *UE,
|
||||
} else
|
||||
ue_ta_procedures(UE, proc->nr_slot_tx, proc->frame_tx);
|
||||
|
||||
TracyCZoneEnd(ctx);
|
||||
return sampleShift;
|
||||
}
|
||||
|
||||
void UE_dl_processing(void *arg) {
|
||||
TracyCZone(ctx, true);;
|
||||
nr_rxtx_thread_data_t *rxtxD = (nr_rxtx_thread_data_t *) arg;
|
||||
UE_nr_rxtx_proc_t *proc = &rxtxD->proc;
|
||||
PHY_VARS_NR_UE *UE = rxtxD->UE;
|
||||
@@ -701,6 +707,8 @@ void UE_dl_processing(void *arg) {
|
||||
|
||||
if (!UE->sl_mode)
|
||||
pdsch_processing(UE, proc, phy_data);
|
||||
|
||||
TracyCZoneEnd(ctx);
|
||||
}
|
||||
|
||||
void dummyWrite(PHY_VARS_NR_UE *UE,openair0_timestamp timestamp, int writeBlockSize) {
|
||||
@@ -965,6 +973,7 @@ void *UE_thread(void *arg)
|
||||
|
||||
// start of normal case, the UE is in sync
|
||||
absolute_slot++;
|
||||
TracyCFrameMark;
|
||||
|
||||
int slot_nr = absolute_slot % nb_slot_frame;
|
||||
nr_rxtx_thread_data_t curMsg = {0};
|
||||
|
||||
Reference in New Issue
Block a user