Version: 1
-Previous: 1ac4645d180029b6c86c76ba547ef3160f1e84b8
-Head: fd12d10886931771a094d0f39c0f14c884cbef35
+Previous: 79e52f2b265f36dfc6ef7f48ec1dec8159a3ee19
+Head: 05dfe9b4d7c7afbabbdd9abaeb4fbff11bb7a420
Applied:
real-close: 3409f8d6af187d25c63a5d1f8ee8bff5f14555e2
dup2: ca5813e7cf95dee5933fc417e4a34d26f2b01824
oobinline: ac51c1095f505373a6ec54b8f1d990259fb34d97
fstat: a62c653906870422edef5f6388dac9f76c953e35
- dbg-out: 48ad17250a8b5952d8e84ebc5b8d8a78c89f99d0
- refresh-temp: fd12d10886931771a094d0f39c0f14c884cbef35
+ dbg-out: 05dfe9b4d7c7afbabbdd9abaeb4fbff11bb7a420
Unapplied:
dbg: 0c269855776d3001e37da8c8afe283c20e1d6cd6
waitall-buggy: c49c6b56c55385774065f5aa2704078e6ae0ceb8
Bottom: 6bbb92f637582964eea7a287f91549c84da9571a
-Top: 5623cf863fc9cc2ced3b180c705ed739b95978f8
+Top: ed2f9afb0d122614fb6b76d78e385a49be99b24f
Author: Sean Hefty <sean.hefty@intel.com>
Date: 2012-08-07 21:30:48 -0700
---
diff --git a/src/preload.c b/src/preload.c
-index 53f8543..458362d 100644
+index 53f8543..939325a 100644
--- a/src/preload.c
+++ b/src/preload.c
@@ -48,6 +48,8 @@
lclose:
rclose(lfd);
-@@ -628,6 +660,8 @@ ssize_t read(int socket, void *buf, size_t count)
+@@ -628,6 +660,9 @@ ssize_t read(int socket, void *buf, size_t count)
{
int fd;
init_preload();
-+ fprintf(fout, "%d read %d read fd %d\n", syscall(SYS_gettid), socket, fd_getd(socket));
++ fprintf(fout, "%d read %d real fd %d type %d\n",
++ syscall(SYS_gettid), socket, fd_getd(socket), fd_gett(socket));
+ fflush(fout);
return (fd_fork_get(socket, &fd) == fd_rsocket) ?
rread(fd, buf, count) : real.read(fd, buf, count);
}
-@@ -820,6 +854,8 @@ int close(int socket)
+@@ -820,18 +855,29 @@ int close(int socket)
int ret;
init_preload();
-+ fprintf(fout, "%d close %d real fd %d\n", syscall(SYS_gettid), socket, fd_getd(socket));
++ fprintf(fout, "%d close %d real fd %d type %d\n",
++ syscall(SYS_gettid), socket, fd_getd(socket), fd_gett(socket));
+ fflush(fout);
fdi = idm_lookup(&idm, socket);
if (!fdi)
return real.close(socket);
-@@ -924,6 +960,8 @@ int dup2(int oldfd, int newfd)
+
+ if (fdi->dupfd != -1) {
++ fprintf(fout, "%d closing dupfd %d\n",
++ 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",
++ syscall(SYS_gettid), atomic_get(&fdi->refcnt));
++ fflush(fout);
+ return 0;
++ }
+
+ idm_clear(&idm, socket);
+ real.close(socket);
+@@ -924,6 +970,8 @@ int dup2(int oldfd, int newfd)
int ret;
init_preload();
oldfdi = idm_lookup(&idm, oldfd);
if (oldfdi && oldfdi->type == fd_fork)
fork_passive(oldfd);
-@@ -961,6 +999,9 @@ int dup2(int oldfd, int newfd)
+@@ -961,6 +1009,9 @@ int dup2(int oldfd, int newfd)
atomic_init(&newfdi->refcnt);
atomic_set(&newfdi->refcnt, 1);
atomic_inc(&oldfdi->refcnt);
return newfd;
}
-@@ -968,12 +1009,19 @@ int __fxstat64(int ver, int socket, struct stat64 *buf)
+@@ -968,12 +1019,19 @@ int __fxstat64(int ver, int socket, struct stat64 *buf)
{
int fd, ret;
+++ /dev/null
-Bottom: 5623cf863fc9cc2ced3b180c705ed739b95978f8
-Top: ed2f9afb0d122614fb6b76d78e385a49be99b24f
-Author: Sean Hefty <sean.hefty@intel.com>
-Date: 2012-08-08 10:27:51 -0700
-
-Refresh of dbg-out
-
----
-
-diff --git a/src/preload.c b/src/preload.c
-index 458362d..939325a 100644
---- a/src/preload.c
-+++ b/src/preload.c
-@@ -660,7 +660,8 @@ ssize_t read(int socket, void *buf, size_t count)
- {
- int fd;
- init_preload();
-- fprintf(fout, "%d read %d read fd %d\n", syscall(SYS_gettid), socket, fd_getd(socket));
-+ fprintf(fout, "%d read %d real fd %d type %d\n",
-+ syscall(SYS_gettid), socket, fd_getd(socket), fd_gett(socket));
- fflush(fout);
- return (fd_fork_get(socket, &fd) == fd_rsocket) ?
- rread(fd, buf, count) : real.read(fd, buf, count);
-@@ -854,20 +855,29 @@ int close(int socket)
- int ret;
-
- init_preload();
-- fprintf(fout, "%d close %d real fd %d\n", syscall(SYS_gettid), socket, fd_getd(socket));
-+ fprintf(fout, "%d close %d real fd %d type %d\n",
-+ 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",
-+ 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",
-+ syscall(SYS_gettid), atomic_get(&fdi->refcnt));
-+ fflush(fout);
- return 0;
-+ }
-
- idm_clear(&idm, socket);
- real.close(socket);