Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 4358203

Browse files
committed
remove some noisy log
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
1 parent f6e080e commit 4358203

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

src/event.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,6 @@ void hyper_event_hup(struct hyper_event *he, int efd)
178178
int hyper_handle_event(int efd, struct epoll_event *event)
179179
{
180180
struct hyper_event *he = event->data.ptr;
181-
fprintf(stdout, "%s get event %d, he %p, fd %d. ops %p\n",
182-
__func__, event->events, he, he->fd, he->ops);
183181

184182
/* do not handle hup event if have in/out event */
185183
if ((event->events & EPOLLIN) && he->ops->read) {

src/exec.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,6 @@ struct hyper_exec *hyper_find_exec_by_pid(struct list_head *head, int pid)
737737
struct hyper_exec *exec;
738738

739739
list_for_each_entry(exec, head, list) {
740-
fprintf(stdout, "exec pid %d, pid %d\n", exec->pid, pid);
741740
if (exec->pid != pid)
742741
continue;
743742

@@ -752,8 +751,6 @@ struct hyper_exec *hyper_find_exec_by_seq(struct hyper_pod *pod, uint64_t seq)
752751
struct hyper_exec *exec;
753752

754753
list_for_each_entry(exec, &pod->exec_head, list) {
755-
fprintf(stdout, "exec seq %" PRIu64 ", seq %" PRIu64 "\n",
756-
exec->seq, seq);
757754
if (exec->seq != seq)
758755
continue;
759756

@@ -821,8 +818,6 @@ int hyper_handle_exec_exit(struct hyper_pod *pod, int pid, uint8_t code)
821818

822819
exec = hyper_find_exec_by_pid(&pod->exec_head, pid);
823820
if (exec == NULL) {
824-
fprintf(stdout, "can not find exec whose pid is %d\n",
825-
pid);
826821
return 0;
827822
}
828823

src/init.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,16 +1086,14 @@ static int hyper_ctlmsg_handle(struct hyper_event *he, uint32_t len)
10861086
struct hyper_pod *pod = he->ptr;
10871087
uint32_t type = 0, datalen = 0;
10881088
uint8_t *data = NULL;
1089-
int i, ret = 0;
1089+
int ret = 0;
10901090

10911091
// append a null byte to it. hyper_ctlfd_read() left this room for us.
10921092
buf->data[buf->get] = 0;
1093-
for (i = 0; i < buf->get; i++)
1094-
fprintf(stdout, "%0x ", buf->data[i]);
10951093

10961094
type = hyper_get_be32(buf->data);
10971095

1098-
fprintf(stdout, "\n %s, type %" PRIu32 ", len %" PRIu32 "\n",
1096+
fprintf(stdout, "%s, type %" PRIu32 ", len %" PRIu32 "\n",
10991097
__func__, type, len);
11001098

11011099
switch (type) {
@@ -1171,8 +1169,6 @@ static int hyper_ctlfd_read(struct hyper_event *he, int efd, int events)
11711169
int size;
11721170
int ret;
11731171

1174-
fprintf(stdout, "%s\n", __func__);
1175-
11761172
if (buf->get < CONTROL_HEADER_SIZE) {
11771173
size = hyper_channel_read(he, efd, CONTROL_HEADER_SIZE - buf->get, events);
11781174
if (size < 0) {
@@ -1191,7 +1187,7 @@ static int hyper_ctlfd_read(struct hyper_event *he, int efd, int events)
11911187
}
11921188

11931189
len = hyper_get_be32(buf->data + CONTROL_HEADER_LENGTH_OFFSET);
1194-
fprintf(stdout, "get length %" PRIu32"\n", len);
1190+
fprintf(stdout, "%s: get length %" PRIu32"\n", __func__, len);
11951191
// test it with '>=' to leave at least one byte in hyper_ctlfd_handle(),
11961192
// so that hyper_ctlfd_handle() can convert the data to c-string inplace.
11971193
if (len >= buf->size) {
@@ -1336,7 +1332,6 @@ static int hyper_loop(void)
13361332
perror("hyper wait event failed");
13371333
return -1;
13381334
}
1339-
fprintf(stdout, "%s epoll_wait %d\n", __func__, n);
13401335

13411336
for (i = 0; i < n; i++) {
13421337
if (hyper_handle_event(hyper_epoll.efd, &events[i]) < 0)

0 commit comments

Comments
 (0)