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
Michael Black
OpenXG-RAN
Commits
6d7a1a16
Commit
6d7a1a16
authored
Oct 11, 2017
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor: improve T tracer logs
parent
6e269b36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
common/utils/T/T.c
common/utils/T/T.c
+1
-1
common/utils/T/local_tracer.c
common/utils/T/local_tracer.c
+5
-5
No files found.
common/utils/T/T.c
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 */
...
...
common/utils/T/local_tracer.c
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
&&
...
...
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