From dcdcc3b1a11f634e7a87990f9c3665d98982516e Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Wed, 9 Jan 2013 13:56:36 -0800 Subject: [PATCH] delete --- meta | 3 +- patches/dbg-out | 165 ------------------------------------------------ 2 files changed, 1 insertion(+), 167 deletions(-) delete mode 100644 patches/dbg-out diff --git a/meta b/meta index 5a401850..d0c62f1e 100644 --- a/meta +++ b/meta @@ -1,5 +1,5 @@ Version: 1 -Previous: 72b70a741b0bb26417fb22584256aaa8fd0ece33 +Previous: edfe742876a55048d97b4b65034d705957023e0a Head: 6047e1991e95b96b1992f39a466457e584c01226 Applied: Unapplied: @@ -7,7 +7,6 @@ Unapplied: rs-target-sgl: 7a07c80f2242e80c076dcf3ec6bb4c94626b284f af-ib-conn: 70cdbcec6986d1fcc8146a73cf2d8b6a537e71f5 addrtype: fffb812c9cbe707f830d1e7e713feb3ae3e2e8ec - dbg-out: 4b4c0572eab77856d8fbb919b1feb8f3502a101a dbg: 0c269855776d3001e37da8c8afe283c20e1d6cd6 old-rs-1sge: 8ec392829399dec7ed5c608b8697a482e5faa2de Hidden: diff --git a/patches/dbg-out b/patches/dbg-out deleted file mode 100644 index af837a77..00000000 --- a/patches/dbg-out +++ /dev/null @@ -1,165 +0,0 @@ -Bottom: 758d450afd5a63013c7540fa171eea46bb810c1a -Top: 1553275a3c6855e88d8b2c6f8cfb26579eb9307a -Author: Sean Hefty -Date: 2012-08-07 21:30:48 -0700 - -support for debug prints - ---- - -diff --git a/src/preload.c b/src/preload.c -index ec62e69..ac36642 100644 ---- a/src/preload.c -+++ b/src/preload.c -@@ -50,6 +50,8 @@ - #include - #include - #include -+#include -+#include - - #include - #include -@@ -102,6 +104,8 @@ static int rq_size; - static int sq_inline; - static int fork_support; - -+static FILE *fout; -+ - enum fd_type { - fd_normal, - fd_rsocket -@@ -309,6 +313,7 @@ static void init_preload(void) - rs.getsockopt = dlsym(RTLD_DEFAULT, "rgetsockopt"); - rs.fcntl = dlsym(RTLD_DEFAULT, "rfcntl"); - -+ fout = fopen("rs-out.txt", "w+"); - getenv_options(); - init = 1; - out: -@@ -410,10 +415,12 @@ int socket(int domain, int type, int protocol) - goto real; - - init_preload(); -+ fprintf(fout, "%d socket\n", (int)syscall(SYS_gettid)); - index = fd_open(); - if (index < 0) - return index; - -+ fprintf(fout, "%d socket %d\n", (int)syscall(SYS_gettid), index); fflush(fout); - recursive = 1; - ret = rsocket(domain, type, protocol); - recursive = 0; -@@ -428,6 +435,9 @@ int socket(int domain, int type, int protocol) - fd_store(index, ret, fd_rsocket, fd_ready); - set_rsocket_options(ret); - } -+ fprintf(fout, "%d socket %d real fd %d type %d\n", -+ (int)syscall(SYS_gettid), index, ret, fd_gett(index)); -+ fflush(fout); - return index; - } - fd_close(index, &ret); -@@ -438,6 +448,7 @@ real: - int bind(int socket, const struct sockaddr *addr, socklen_t addrlen) - { - int fd; -+ fprintf(fout, "%d bind %d\n", (int)syscall(SYS_gettid), socket); fflush(fout); - return (fd_get(socket, &fd) == fd_rsocket) ? - rbind(fd, addr, addrlen) : real.bind(fd, addr, addrlen); - } -@@ -554,7 +565,6 @@ static void fork_passive(int socket) - uint32_t msg; - - sfd = fd_getd(socket); -- - len = sizeof sin6; - ret = real.getsockname(sfd, (struct sockaddr *) &sin6, &len); - if (ret) -@@ -586,11 +596,17 @@ static void fork_passive(int socket) - ret = rlisten(lfd, 1); - if (ret) - goto lclose; -+ fprintf(fout, "%d fork_passive %d, listening for fork\n", (int)syscall(SYS_gettid), socket); -+ fflush(fout); - - msg = 0; - len = real.write(sfd, &msg, sizeof msg); - if (len != sizeof msg) -+ { -+ fprintf(fout, "%d fork_passive - %d write failed\n", (int)syscall(SYS_gettid), socket); -+ fflush(fout); - goto lclose; -+ } - - dfd = raccept(lfd, NULL, NULL); - if (dfd < 0) { -@@ -874,18 +890,29 @@ int close(int socket) - int ret; - - init_preload(); -+ fprintf(fout, "%d close %d real fd %d type %d\n", -+ (int)syscall(SYS_gettid), socket, fd_getd(socket), fd_gett(socket)); -+ fflush(fout); - fdi = idm_lookup(&idm, socket); - if (!fdi) - return real.close(socket); - - if (fdi->dupfd != -1) { -+ fprintf(fout, "%d closing dupfd %d\n", -+ (int)syscall(SYS_gettid), fdi->dupfd); -+ fflush(fout); - ret = close(fdi->dupfd); - if (ret) - return ret; - } - - if (atomic_dec(&fdi->refcnt)) -+ { -+ fprintf(fout, "%d close - still have ref %d\n", -+ (int)syscall(SYS_gettid), atomic_get(&fdi->refcnt)); -+ fflush(fout); - return 0; -+ } - - idm_clear(&idm, socket); - real.close(socket); -@@ -978,6 +1005,8 @@ int dup2(int oldfd, int newfd) - int ret; - - init_preload(); -+ fprintf(fout, "%d dup2 %d -> %d\n", (int)syscall(SYS_gettid), oldfd, newfd); -+ fflush(fout); - oldfdi = idm_lookup(&idm, oldfd); - if (oldfdi && oldfdi->type == fd_fork) - fork_passive(oldfd); -@@ -1015,6 +1044,9 @@ int dup2(int oldfd, int newfd) - atomic_init(&newfdi->refcnt); - atomic_set(&newfdi->refcnt, 1); - atomic_inc(&oldfdi->refcnt); -+ fprintf(fout, "%d dup2 %d -> %d, real fd %d type %d\n", -+ (int)syscall(SYS_gettid), oldfd, newfd, newfdi->fd, newfdi->type); -+ fflush(fout); - return newfd; - } - -@@ -1040,8 +1072,10 @@ ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count) - - int __fxstat64(int ver, int socket, struct stat64 *buf) - { --// int fd, ret; -+ int fd, ret; - -+ init_preload(); -+ fprintf(fout, "%s\n", __func__); fflush(fout); - // if (fd_get(socket, &fd) == fd_rsocket) { - // ret = real.fxstat64(ver, socket, buf); - // if (!ret) -@@ -1055,5 +1089,7 @@ int __fxstat64(int ver, int socket, struct stat64 *buf) - - int __fxstat(int ver, int socket, struct stat *buf) - { -+ init_preload(); -+ fprintf(fout, "%s\n", __func__); fflush(fout); - return real.fxstat(ver, socket, buf); - } -- 2.46.0