]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
removed fdTouch debugging
authorwessels <>
Wed, 20 Jan 1999 00:41:02 +0000 (00:41 +0000)
committerwessels <>
Wed, 20 Jan 1999 00:41:02 +0000 (00:41 +0000)
src/fd.cc
src/protos.h
src/squid.h
src/stat.cc
src/store_client.cc
src/store_swapin.cc
src/store_swapout.cc
src/structs.h

index 467ef049961214312e9b3f4957ae783e54e0c6db..dbf82fcc5696b19e4c1a2e8b0ed497064df30811 100644 (file)
--- a/src/fd.cc
+++ b/src/fd.cc
@@ -1,6 +1,6 @@
 
 /*
- * $Id: fd.cc,v 1.32 1999/01/19 02:24:24 wessels Exp $
+ * $Id: fd.cc,v 1.33 1999/01/19 17:41:02 wessels Exp $
  *
  * DEBUG: section 51    Filedescriptor Functions
  * AUTHOR: Duane Wessels
@@ -192,15 +192,3 @@ fdAdjustReserved(void)
        RESERVED_FD, new);
     RESERVED_FD = new;
 }
-
-void
-fdTouchFL(int fd, const char *file, int line)
-{
-    fde *F;
-    if (fd < 0)
-       return;
-    F = &fd_table[fd];
-    assert(F->flags.open);
-    F->last.file = file;
-    F->last.line = line;
-}
index 673d77bfc4cb91fc3aaaf63526fcd6212621e188..c1b6990edfb8f6cc34d826074dab3bf5013ead3a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: protos.h,v 1.305 1999/01/19 02:24:29 wessels Exp $
+ * $Id: protos.h,v 1.306 1999/01/19 17:41:03 wessels Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -225,7 +225,6 @@ extern void fdFreeMemory(void);
 extern void fdDumpOpen(void);
 extern int fdNFree(void);
 extern void fdAdjustReserved(void);
-extern void fdTouchFL(int, const char *, int);
 
 extern fileMap *file_map_create(int);
 extern int file_map_allocate(fileMap *, int);
index d679e1f18e4ce94ad902166d831d3c0a4ef03443..d10383a553fd10e0ecad2f55eb6dabc2fc92ea37 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: squid.h,v 1.184 1999/01/18 22:23:39 wessels Exp $
+ * $Id: squid.h,v 1.185 1999/01/19 17:41:04 wessels Exp $
  *
  * AUTHOR: Duane Wessels
  *
@@ -310,8 +310,6 @@ struct rusage {
 #define leakFree(p) p
 #endif
 
-#define fdTouch(f) fdTouchFL(f,__FILE__,__LINE__)
-
 #if defined(_SQUID_NEXT_) && !defined(S_ISDIR)
 #define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR))
 #endif
index 6b644a1d2ed07a97923d8b7f909d201a1df7c54a..4b9d08e2aa05c53a26af5347ebba303099c47d37 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stat.cc,v 1.309 1999/01/19 02:24:31 wessels Exp $
+ * $Id: stat.cc,v 1.310 1999/01/19 17:41:05 wessels Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -420,15 +420,13 @@ statFiledescriptors(StoreEntry * sentry)
        f = &fd_table[i];
        if (!f->flags.open)
            continue;
-       storeAppendPrintf(sentry, "%4d %-6.6s %4d %7d %7d %-21s %20s:%-5d %s\n",
+       storeAppendPrintf(sentry, "%4d %-6.6s %4d %7d %7d %-21s %s\n",
            i,
            fdTypeStr[f->type],
            f->timeout_handler ? (int) (f->timeout - squid_curtime) / 60 : 0,
            f->bytes_read,
            f->bytes_written,
            fdRemoteAddr(f),
-           f->last.line ? f->last.file : null_string,
-           f->last.line,
            f->desc);
     }
 }
index 888db189a84ceab8fe90904f538027fbe2a87506..909636a36a3576906e9f75546089831225233827 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_client.cc,v 1.55 1999/01/18 22:23:44 wessels Exp $
+ * $Id: store_client.cc,v 1.56 1999/01/19 17:41:06 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager Client-Side Interface
  * AUTHOR: Duane Wessels
@@ -295,7 +295,6 @@ storeClientFileOpened(int fd, void *data)
        callback(sc->callback_data, sc->copy_buf, -1);
        return;
     }
-    fdTouch(fd);
     sc->swapin_fd = fd;
     storeClientFileRead(sc);
 }
@@ -308,7 +307,6 @@ storeClientFileRead(store_client * sc)
 #ifdef OPTIMISTIC_IO
     sc->flags.disk_io_pending = 1;
 #endif
-    fdTouch(sc->swapin_fd);
     if (mem->swap_hdr_sz == 0) {
        file_read(sc->swapin_fd,
            sc->copy_buf,
@@ -337,7 +335,6 @@ storeClientReadBody(int fd, const char *buf, int len, int flagnotused, void *dat
     store_client *sc = data;
     MemObject *mem = sc->entry->mem_obj;
     STCB *callback = sc->callback;
-    fdTouch(fd);
     assert(sc->flags.disk_io_pending);
     sc->flags.disk_io_pending = 0;
     assert(sc->callback != NULL);
@@ -359,7 +356,6 @@ storeClientReadHeader(int fd, const char *buf, int len, int flagnotused, void *d
     size_t body_sz;
     size_t copy_sz;
     tlv *tlv_list;
-    fdTouch(fd);
     assert(sc->flags.disk_io_pending);
     sc->flags.disk_io_pending = 0;
     assert(sc->callback != NULL);
@@ -370,7 +366,6 @@ storeClientReadHeader(int fd, const char *buf, int len, int flagnotused, void *d
        callback(sc->callback_data, sc->copy_buf, len);
        return;
     }
-    fdTouch(fd);
     tlv_list = storeSwapMetaUnpack(buf, &swap_hdr_sz);
     if (tlv_list == NULL) {
        debug(20, 1) ("storeClientReadHeader: failed to unpack meta data\n");
@@ -378,7 +373,6 @@ storeClientReadHeader(int fd, const char *buf, int len, int flagnotused, void *d
        callback(sc->callback_data, sc->copy_buf, -1);
        return;
     }
-    fdTouch(fd);
     /*
      * XXX Here we should check the meta data and make sure we got
      * the right object.
@@ -405,7 +399,6 @@ storeClientReadHeader(int fd, const char *buf, int len, int flagnotused, void *d
        callback(sc->callback_data, sc->copy_buf, copy_sz);
        return;
     }
-    fdTouch(fd);
     /*
      * we don't have what the client wants, but at least we now
      * know the swap header size.
@@ -451,7 +444,6 @@ storeUnregister(StoreEntry * e, void *data)
     *S = sc->next;
     mem->nclients--;
     sc->flags.disk_io_pending = 0;
-    fdTouch(sc->swapin_fd);
     if (e->store_status == STORE_OK && e->swap_status != SWAPOUT_DONE)
        storeCheckSwapOut(e);
     if (sc->swapin_fd > -1) {
index 3d1223b2018d5695aec9361fe6c2f18baa11cbe9..416a45c6a9a4e49725c2c64ad585c93440d881b0 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_swapin.cc,v 1.15 1999/01/18 22:23:44 wessels Exp $
+ * $Id: store_swapin.cc,v 1.16 1999/01/19 17:41:07 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager Swapin Functions
  * AUTHOR: Duane Wessels
@@ -108,7 +108,6 @@ storeSwapInFileOpened(void *data, int fd, int errcode)
        xfree(ctrlp);
        return;
     }
-    fdTouch(fd);
     assert(mem != NULL);
     assert(e->mem_status == NOT_IN_MEMORY);
     assert(e->swap_status == SWAPOUT_WRITING || e->swap_status == SWAPOUT_DONE);
index 0342fdc3099f741349e6db93ca847a6a1b30c38c..1d3aaa49cf68d4f880c0b7f3dfc58874efb83e24 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_swapout.cc,v 1.43 1999/01/18 22:23:45 wessels Exp $
+ * $Id: store_swapout.cc,v 1.44 1999/01/19 17:41:08 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager Swapout Functions
  * AUTHOR: Duane Wessels
@@ -74,7 +74,6 @@ storeSwapOutHandle(int fdnotused, int flag, size_t len, void *data)
     StoreEntry *e = ctrlp->e;
     MemObject *mem = e->mem_obj;
     debug(20, 3) ("storeSwapOutHandle: '%s', len=%d\n", storeKeyText(e->key), (int) len);
-    fdTouch(fdnotused);
     if (flag < 0) {
        debug(20, 1) ("storeSwapOutHandle: SwapOut failure (err code = %d).\n",
            flag);
@@ -93,7 +92,6 @@ storeSwapOutHandle(int fdnotused, int flag, size_t len, void *data)
        storeSwapOutFileClose(e);
        return;
     }
-    fdTouch(fdnotused);
 #if USE_ASYNC_IO
     if (mem == NULL) {
        debug(20, 1) ("storeSwapOutHandle: mem == NULL : Cancelling swapout\n");
@@ -111,7 +109,6 @@ storeSwapOutHandle(int fdnotused, int flag, size_t len, void *data)
        storeCheckSwapOut(e);
        return;
     }
-    fdTouch(fdnotused);
     /* swapping complete */
     debug(20, 5) ("storeSwapOutHandle: SwapOut complete: '%s' to %s.\n",
        storeUrl(e), storeSwapFullPath(e->swap_file_number, NULL));
@@ -122,7 +119,6 @@ storeSwapOutHandle(int fdnotused, int flag, size_t len, void *data)
        storeLog(STORE_LOG_SWAPOUT, e);
        storeDirSwapLog(e, SWAP_LOG_ADD);
     }
-    fdTouch(fdnotused);
     /* Note, we don't otherwise call storeReleaseRequest() here because
      * storeCheckCachable() does it for is if necessary */
     storeSwapOutFileClose(e);
@@ -252,7 +248,6 @@ storeCheckSwapOut(StoreEntry * e)
     debug(20, 3) ("storeCheckSwapOut: swapping out %d bytes from %d\n",
        swap_buf_len, (int) mem->swapout.queue_offset);
     mem->swapout.queue_offset += swap_buf_len - hdr_len;
-    fdTouch(mem->swapout.fd);
     file_write(mem->swapout.fd,
        -1,
        swap_buf,
@@ -293,7 +288,6 @@ storeSwapOutFileOpened(void *data, int fd, int errcode)
     int swap_hdr_sz = 0;
     tlv *tlv_list;
     char *buf;
-    fdTouch(fd);
     if (fd == -2 && errcode == -2) {   /* Cancelled - Clean up */
        xfree(ctrlp->swapfilename);
        cbdataFree(ctrlp);
index 11d85329e3c7a6a695da3efa3f8124009b3567e9..e1eb687d0cb7ab10f22356cddd796288c05ecc4e 100644 (file)
@@ -1,7 +1,7 @@
 
 
 /*
- * $Id: structs.h,v 1.263 1999/01/19 05:24:49 wessels Exp $
+ * $Id: structs.h,v 1.264 1999/01/19 17:41:09 wessels Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -531,10 +531,6 @@ struct _fde {
     DEFER *defer_check;                /* check if we should defer read */
     void *defer_data;
     CommWriteStateData *rwstate;       /* State data for comm_write */
-    struct {
-       const char *file;
-       int line;
-    } last;
 };
 
 struct _fileMap {