From: David Herrmann Date: Sat, 3 Dec 2011 14:09:10 +0000 (+0100) Subject: Eloop: Add debug statements X-Git-Tag: kmscon-7~1330 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7fa1ab55dd2d5f5ed9c55a818eea0663ce9a59a5;p=platform%2Fupstream%2Fkmscon.git Eloop: Add debug statements Add some more debug statements to allow easier eloop monitoring. Signed-off-by: David Herrmann --- diff --git a/src/eloop.c b/src/eloop.c index 8e61b54..f5fb99f 100644 --- a/src/eloop.c +++ b/src/eloop.c @@ -499,6 +499,7 @@ int kmscon_eloop_new(struct kmscon_eloop **out) return -errno; } + log_debug("eloop: create eloop object\n"); *out = loop; return 0; } @@ -519,6 +520,7 @@ void kmscon_eloop_unref(struct kmscon_eloop *loop) if (--loop->ref) return; + log_debug("eloop: destroy eloop object\n"); close(loop->efd); free(loop); } @@ -542,8 +544,12 @@ int kmscon_eloop_dispatch(struct kmscon_eloop *loop, int timeout) /* dispatch fd events */ count = epoll_wait(loop->efd, ep, 32, timeout); - if (count < 0) + if (count < 0) { + log_warning("eloop: epoll_wait dispatching failed\n"); return -errno; + } + + log_debug("eloop: dispatch %d fd event(s)\n", count); loop->cur_fds = ep; loop->cur_fds_cnt = count;