Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
lizhongxiao
OpenXG-RAN
Commits
e254b568
Commit
e254b568
authored
Jan 11, 2024
by
Thomas Schlichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small optimization in start_meas() and stop_meas()
parent
72322177
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
common/utils/time_meas.h
common/utils/time_meas.h
+5
-11
No files found.
common/utils/time_meas.h
View file @
e254b568
...
...
@@ -139,27 +139,21 @@ static inline int cpumeas(int action) {
static
inline
void
start_meas
(
time_stats_t
*
ts
)
{
if
(
opp_enabled
)
{
if
(
ts
->
meas_flag
==
0
)
{
ts
->
trials
++
;
ts
->
in
=
rdtsc_oai
();
ts
->
meas_flag
=
1
;
}
else
{
ts
->
in
=
rdtsc_oai
();
}
if
((
ts
->
trials
&
16383
)
<
10
)
ts
->
max
=
0
;
ts
->
meas_flag
=
1
;
ts
->
in
=
rdtsc_oai
();
}
}
static
inline
void
stop_meas
(
time_stats_t
*
ts
)
{
if
(
opp_enabled
)
{
long
long
out
=
rdtsc_oai
();
if
(
ts
->
in
)
{
if
(
ts
->
meas_flag
==
1
)
{
ts
->
diff
+=
(
out
-
ts
->
in
);
/// process duration is the difference between two clock points
ts
->
p_time
=
(
out
-
ts
->
in
);
ts
->
diff_square
+=
((
double
)
out
-
ts
->
in
)
*
((
double
)
out
-
ts
->
in
);
if
((
out
-
ts
->
in
)
>
ts
->
max
)
ts
->
trials
++
;
if
((
ts
->
trials
&
16383
)
<
10
||
(
out
-
ts
->
in
)
>
ts
->
max
)
ts
->
max
=
out
-
ts
->
in
;
ts
->
meas_flag
=
0
;
...
...
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