Index: src/comm_epoll.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/comm_epoll.cc,v
retrieving revision 1.11
diff -U6 -p -r1.11 comm_epoll.cc
--- src/comm_epoll.cc	29 May 2006 00:50:18 -0000	1.11
+++ src/comm_epoll.cc	29 May 2006 14:05:54 -0000
@@ -191,20 +191,36 @@ commSetSelect(int fd, unsigned int type,
     }
 
     if (timeout)
         F->timeout = squid_curtime + timeout;
 }
 
+
+static void commIncomingStats(StoreEntry * sentry);
+
+void
+commEPollRegisterWithCacheManager(CacheManager& manager)
+{
+    manager.registerAction("comm_select_incoming",
+                           "comm_incoming() stats",
+                           commIncomingStats, 0, 1);
+}
+static void
+commIncomingStats(StoreEntry * sentry)
+{
+    StatCounters *f = &statCounter;
+    storeAppendPrintf(sentry, "Total number of epoll(2) loops: %d\n", statCounter.select_loops);
+    storeAppendPrintf(sentry, "Histogram of returned filedescriptors\n");
+    statHistDump(&f->select_fds_hist, sentry, statHistIntDumper);
+}
+
 /*
+ * comm_select
  * Check all connections for new connections and input data that is to be
  * processed. Also check for connections with data queued and whether we can
  * write it out.
- */
-
-/*
- * comm_select
  *
  * Called to do the new-style IO, courtesy of of squid (like most of this
  * new IO code). This routine handles the stuff we've hidden in
  * comm_setselect and fd_table[] and calls callbacks for IO ready
  * events.
  */
Index: src/main.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/main.cc,v
retrieving revision 1.62
diff -U6 -p -r1.62 main.cc
--- src/main.cc	29 May 2006 00:50:18 -0000	1.62
+++ src/main.cc	29 May 2006 14:05:55 -0000
@@ -864,13 +864,15 @@ mainInitialize(void)
 #ifdef USE_SELECT
 
         commSelectRegisterWithCacheManager(manager);
 #endif
 
         clientdbRegisterWithCacheManager(manager);
+#if DELAY_POOLS
         DelayPools::RegisterWithCacheManager(manager);
+#endif
         DiskIOModule::RegisterAllModulesWithCacheManager(manager);
 #if USE_DNSSERVERS
 
         dnsRegisterWithCacheManager(manager);
 #endif
 
@@ -892,13 +894,15 @@ mainInitialize(void)
         storeRegisterWithCacheManager(manager);
 #if DEBUGSTRINGS
 
         StringRegistry::Instance().registerWithCacheManager(manager);
 #endif
 
+#if	USE_XPROF_STATS
         xprofRegisterWithCacheManager(manager);
+#endif
     }
 
 #if USE_WCCP
     wccpInit();
 
 #endif
Index: src/store_digest.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/store_digest.cc,v
retrieving revision 1.15
diff -U6 -p -r1.15 store_digest.cc
--- src/store_digest.cc	29 May 2006 00:50:18 -0000	1.15
+++ src/store_digest.cc	29 May 2006 14:05:55 -0000
@@ -38,15 +38,15 @@
  * TODO: We probably do not track all the cases when
  *       storeDigestNoteStoreReady() must be called; this may prevent
  *       storeDigestRebuild/write schedule to be activated
  */
 
 #include "squid.h"
+#include "CacheManager.h"
 #if USE_CACHE_DIGESTS
 
-#include "CacheManager.h"
 #include "Store.h"
 #include "HttpRequest.h"
 #include "HttpReply.h"
 #include "MemObject.h"
 #include "SquidTime.h"
 #include "StoreSearch.h"


