Worked around fubar with cpu_profile initialization call.
}
}
+// FIXME:
+// this gets colled once per event. This doesn't seem to make much sense,
+// does it?
static hrtime_t now;
static void
xprof_Init(void)
{
- xprofRegisterWithCacheManager();
-
if (xprof_inited)
return;
xprof_delta = xprof_verystart = xprof_start_t = now;
xprof_inited = 1;
+
+ xprofRegisterWithCacheManager(); //moved here so it's not double-init'ed
}
void
void add
(String const *);
- void registerWithCacheManager(void);
+ StringRegistry();
void remove
(String const *);
return lhs - rhs;
}
-void
-StringRegistry::registerWithCacheManager(void)
+StringRegistry::StringRegistry()
{
+#if DEBUGSTRINGS
CacheManager::GetInstance()->registerAction("strings",
"Strings in use in squid", Stat, 0, 1);
+#endif
}
void
logfile = logfileOpen(Config.Log.forward, 0, 1);
#endif
+
+ RegisterWithCacheManager();
}
void
typedef RefCount<FwdState> Pointer;
~FwdState();
static void initModule();
- static void RegisterWithCacheManager(void);
static void fwdStart(int fd, StoreEntry *, HttpRequest *);
void startComplete(FwdServer *);
void updateHierarchyInfo();
void completed();
void retryOrBail();
+ static void RegisterWithCacheManager(void);
#if WIP_FWD_LOG
StoreFScoss::StoreFScoss()
{
FsAdd(*this);
+ registerWithCacheManager();
}
char const *
eventInit();
// externalAclRegisterWithCacheManager(); //moved to externalAclInit()
// fqdncacheRegisterWithCacheManager(); //moved to fqdncache_init()
- FwdState::RegisterWithCacheManager();
+ // FwdState::RegisterWithCacheManager(); //moved to FwdState::initModule
// httpHeaderRegisterWithCacheManager(); //moved to httpHeaderInitModule
#if !USE_DNSSERVERS
//TODO: remove cache manager registration functions from namespace
// ipcacheRegisterWithCacheManager(); //moved to ipcache_init()
// Mem::RegisterWithCacheManager(); //moved to Mem::Init()
// netdbRegisterWitHCacheManager(); //moved to netdbInit()
- PconnModule::GetInstance()->registerWithCacheManager();
+ // TODO: pconn is a good candidate for new-style registration
+ // PconnModule::GetInstance()->registerWithCacheManager();
+ // moved to PconnModule::PconnModule()
// redirectRegisterWithCacheManager(); //moved to redirectInit()
// refreshRegisterWithCacheManager(); //moved to refreshInit()
// statRegisterWithCacheManager(); //moved to statInit()
// storeDigestRegisterWithCacheManager(); //moved to storeDigestInit()
- StoreFileSystem::RegisterAllFsWithCacheManager();
+ // StoreFileSystem::RegisterAllFsWithCacheManager();
// storeRegisterWithCacheManager(); //moved to storeInit()
- storeLogRegisterWithCacheManager();
+ // storeLogRegisterWithCacheManager(); //moved to storeLogOpen()
#if DEBUGSTRINGS
-
- StringRegistry::Instance().registerWithCacheManager();
+ // cpu_prStringRegistry::Instance().registerWithCacheManager();
+ // moved to class constructor
#endif
#if USE_XPROF_STATS
pools = (PconnPool **) xcalloc(MAX_NUM_PCONN_POOLS, sizeof(*pools));
pconn_fds_pool = memPoolCreate("pconn_fds", PCONN_FDS_SZ * sizeof(int));
debugs(48, 0, "persistent connection module initialized");
+ registerWithCacheManager();
}
PconnModule *
void
storeLogOpen(void)
{
+ storeLogRegisterWithCacheManager();
+
if (strcmp(Config.Log.store, "none") == 0) {
debugs(20, 1, "Store logging disabled");
return;