Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OAI-RAN-5G-sheduler_MaxTBS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MAQ5G-PFC
OAI-RAN-5G-sheduler_MaxTBS
Commits
6d7a1a16
Commit
6d7a1a16
authored
7 years ago
by
Cedric Roux
Browse files
Options
Downloads
Patches
Plain Diff
minor: improve T tracer logs
parent
6e269b36
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
common/utils/T/T.c
+1
-1
1 addition, 1 deletion
common/utils/T/T.c
common/utils/T/local_tracer.c
+5
-5
5 additions, 5 deletions
common/utils/T/local_tracer.c
with
6 additions
and
6 deletions
common/utils/T/T.c
+
1
−
1
View file @
6d7a1a16
...
...
@@ -36,7 +36,7 @@ static void get_message(int s)
int
is_on
;
if
(
read
(
s
,
&
t
,
1
)
!=
1
)
QUIT
(
"get_message fails"
);
printf
(
"got mess %d
\n
"
,
t
);
printf
(
"
T tracer:
got mess %d
\n
"
,
t
);
switch
(
t
)
{
case
0
:
/* toggle all those IDs */
...
...
This diff is collapsed.
Click to expand it.
common/utils/T/local_tracer.c
+
5
−
5
View file @
6d7a1a16
...
...
@@ -63,7 +63,7 @@ static int get_connection(char *addr, int port)
socklen_t
alen
;
int
s
,
t
;
printf
(
"waiting for connection on %s:%d
\n
"
,
addr
,
port
);
printf
(
"
T tracer:
waiting for connection on %s:%d
\n
"
,
addr
,
port
);
s
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
if
(
s
==
-
1
)
{
perror
(
"socket"
);
exit
(
1
);
}
...
...
@@ -82,7 +82,7 @@ static int get_connection(char *addr, int port)
if
(
t
==
-
1
)
{
perror
(
"accept"
);
exit
(
1
);
}
close
(
s
);
printf
(
"connected
\n
"
);
printf
(
"
T tracer:
connected
\n
"
);
return
t
;
}
...
...
@@ -150,7 +150,7 @@ process:
while
(
size
)
{
int
l
=
write
(
f
->
socket_remote
,
b
,
size
);
if
(
l
<=
0
)
{
printf
(
"forward error
\n
"
);
printf
(
"
T tracer:
forward error
\n
"
);
close
(
f
->
socket_remote
);
f
->
socket_remote
=
-
1
;
break
;
...
...
@@ -268,7 +268,7 @@ static void *forwarder(int port, int s)
f
->
memusage
=
0
;
f
->
last_warning_memusage
=
0
;
printf
(
"waiting for remote tracer on port %d
\n
"
,
port
);
printf
(
"
T tracer:
waiting for remote tracer on port %d
\n
"
,
port
);
f
->
remote_port
=
port
;
f
->
socket_remote
=
get_connection
(
"0.0.0.0"
,
port
);
...
...
@@ -305,7 +305,7 @@ static void forward(void *_forwarder, char *buf, int size)
if
(
f
->
memusage
>
f
->
last_warning_memusage
&&
f
->
memusage
-
f
->
last_warning_memusage
>
100000000
)
{
f
->
last_warning_memusage
+=
100000000
;
printf
(
"WARNING: memory usage is over %"
PRIu64
"MB
\n
"
,
printf
(
"
T tracer:
WARNING: memory usage is over %"
PRIu64
"MB
\n
"
,
f
->
last_warning_memusage
/
1000000
);
}
else
if
(
f
->
memusage
<
f
->
last_warning_memusage
&&
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment