Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Black
OpenXG UE
Commits
56a14972
Commit
56a14972
authored
Feb 28, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address review comments
parent
6b8d7abb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
16 deletions
+19
-16
common/utils/threadPool/thread-pool.h
common/utils/threadPool/thread-pool.h
+10
-7
common/utils/time_meas.h
common/utils/time_meas.h
+8
-8
executables/nr-gnb.c
executables/nr-gnb.c
+1
-1
No files found.
common/utils/threadPool/thread-pool.h
View file @
56a14972
...
@@ -60,10 +60,10 @@ typedef struct notifiedFIFO_elt_s {
...
@@ -60,10 +60,10 @@ typedef struct notifiedFIFO_elt_s {
struct
notifiedFIFO_s
*
reponseFifo
;
struct
notifiedFIFO_s
*
reponseFifo
;
void
(
*
processingFunc
)(
void
*
);
void
(
*
processingFunc
)(
void
*
);
bool
malloced
;
bool
malloced
;
OAI_CPUTIME_TYPE
creationTime
;
oai_cputime_t
creationTime
;
OAI_CPUTIME_TYPE
startProcessingTime
;
oai_cputime_t
startProcessingTime
;
OAI_CPUTIME_TYPE
endProcessingTime
;
oai_cputime_t
endProcessingTime
;
OAI_CPUTIME_TYPE
returnTime
;
oai_cputime_t
returnTime
;
void
*
msgData
;
void
*
msgData
;
}
notifiedFIFO_elt_t
;
}
notifiedFIFO_elt_t
;
...
@@ -96,9 +96,12 @@ static inline void *NotifiedFifoData(notifiedFIFO_elt_t *elt) {
...
@@ -96,9 +96,12 @@ static inline void *NotifiedFifoData(notifiedFIFO_elt_t *elt) {
}
}
static
inline
void
delNotifiedFIFO_elt
(
notifiedFIFO_elt_t
*
elt
)
{
static
inline
void
delNotifiedFIFO_elt
(
notifiedFIFO_elt_t
*
elt
)
{
AssertFatal
(
elt
->
malloced
,
"delNotifiedFIFO on something not allocated by newNotifiedFIFO
\n
"
);
if
(
elt
->
malloced
)
{
elt
->
malloced
=
false
;
elt
->
malloced
=
false
;
free
(
elt
);
free
(
elt
);
}
/* it is allowed to call delNotifiedFIFO_elt when the memory is managed by
* the caller */
}
}
static
inline
void
initNotifiedFIFO_nothreadSafe
(
notifiedFIFO_t
*
nf
)
{
static
inline
void
initNotifiedFIFO_nothreadSafe
(
notifiedFIFO_t
*
nf
)
{
...
...
common/utils/time_meas.h
View file @
56a14972
...
@@ -36,9 +36,9 @@ extern int opp_enabled;
...
@@ -36,9 +36,9 @@ extern int opp_enabled;
extern
double
cpu_freq_GHz
__attribute__
((
aligned
(
32
)));;
extern
double
cpu_freq_GHz
__attribute__
((
aligned
(
32
)));;
// structure to store data to compute cpu measurment
// structure to store data to compute cpu measurment
#if defined(__x86_64__) || defined(__i386__)
#if defined(__x86_64__) || defined(__i386__)
#define OAI_CPUTIME_TYPE long long
typedef
long
long
oai_cputime_t
;
#elif defined(__arm__)
#elif defined(__arm__)
#define OAI_CPUTIME_TYPE uint32_t
typedef
uint32_t
oai_cputime_t
;
#else
#else
#error "building on unsupported CPU architecture"
#error "building on unsupported CPU architecture"
#endif
#endif
...
@@ -53,17 +53,17 @@ typedef void(*meas_printfunc_t)(const char* format, ...);
...
@@ -53,17 +53,17 @@ typedef void(*meas_printfunc_t)(const char* format, ...);
typedef
struct
{
typedef
struct
{
int
msgid
;
/*!< \brief message id, as defined by TIMESTAT_MSGID_X macros */
int
msgid
;
/*!< \brief message id, as defined by TIMESTAT_MSGID_X macros */
int
timestat_id
;
/*!< \brief points to the time_stats_t entry in cpumeas table */
int
timestat_id
;
/*!< \brief points to the time_stats_t entry in cpumeas table */
OAI_CPUTIME_TYPE
ts
;
/*!< \brief time stamp */
oai_cputime_t
ts
;
/*!< \brief time stamp */
meas_printfunc_t
displayFunc
;
/*!< \brief function to call when DISPLAY message is received*/
meas_printfunc_t
displayFunc
;
/*!< \brief function to call when DISPLAY message is received*/
}
time_stats_msg_t
;
}
time_stats_msg_t
;
struct
notifiedFIFO_elt_s
;
struct
notifiedFIFO_elt_s
;
typedef
struct
time_stats
{
typedef
struct
time_stats
{
OAI_CPUTIME_TYPE
in
;
/*!< \brief time at measure starting point */
oai_cputime_t
in
;
/*!< \brief time at measure starting point */
OAI_CPUTIME_TYPE
diff
;
/*!< \brief average difference between time at starting point and time at endpoint*/
oai_cputime_t
diff
;
/*!< \brief average difference between time at starting point and time at endpoint*/
OAI_CPUTIME_TYPE
p_time
;
/*!< \brief absolute process duration */
oai_cputime_t
p_time
;
/*!< \brief absolute process duration */
OAI_CPUTIME_TYPE
diff_square
;
/*!< \brief process duration square */
oai_cputime_t
diff_square
;
/*!< \brief process duration square */
OAI_CPUTIME_TYPE
max
;
/*!< \brief maximum difference between time at starting point and time at endpoint*/
oai_cputime_t
max
;
/*!< \brief maximum difference between time at starting point and time at endpoint*/
int
trials
;
/*!< \brief number of start point - end point iterations */
int
trials
;
/*!< \brief number of start point - end point iterations */
int
meas_flag
;
/*!< \brief 1: stop_meas not called (consecutive calls of start_meas) */
int
meas_flag
;
/*!< \brief 1: stop_meas not called (consecutive calls of start_meas) */
char
*
meas_name
;
/*!< \brief name to use when printing the measure (not used for PHY simulators)*/
char
*
meas_name
;
/*!< \brief name to use when printing the measure (not used for PHY simulators)*/
...
...
executables/nr-gnb.c
View file @
56a14972
...
@@ -423,7 +423,7 @@ void init_gNB_Tpool(int inst) {
...
@@ -423,7 +423,7 @@ void init_gNB_Tpool(int inst) {
s_offset
+=
3
;
s_offset
+=
3
;
}
}
if
(
getenv
(
"noThreads"
))
strcpy
(
pool
,
"n"
);
if
(
getenv
(
"noThreads"
))
strcpy
(
pool
,
"n"
);
initTpool
(
pool
,
gNB
->
threadPool
,
true
);
initTpool
(
pool
,
gNB
->
threadPool
,
cpumeas
(
CPUMEAS_GETSTATE
)
);
// ULSCH decoder result FIFO
// ULSCH decoder result FIFO
gNB
->
respDecode
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
gNB
->
respDecode
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
initNotifiedFIFO
(
gNB
->
respDecode
);
initNotifiedFIFO
(
gNB
->
respDecode
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment