]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Yet more caller refactoring.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 10 Jul 2008 17:59:14 +0000 (19:59 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 10 Jul 2008 17:59:14 +0000 (19:59 +0200)
include/profiling.h
src/ProfStats.cc
src/Store.h
src/main.cc
src/protos.h
src/store.cc
src/store_log.cc

index c34e6c6dd063fea41cfa0e7da4de9882c91bc519..88d354a59328589c102e3562715a675cdd03240e 100644 (file)
@@ -214,7 +214,7 @@ SQUIDCEXTERN void xprof_start(xprof_type type, const char *timer);
 SQUIDCEXTERN void xprof_stop(xprof_type type, const char *timer);
 SQUIDCEXTERN void xprof_event(void *data);
 #if __cplusplus
-extern void xprofRegisterWithCacheManager(CacheManager & manager);
+extern void xprofRegisterWithCacheManager(void);
 #endif
 
 #define PROF_start(type) xprof_start(XPROF_##type, #type)
index 1bd47da4d9a2be28436188e2445d35defa7537ca..eb9506fa8f91e3aa49f8d9929aa0b770d6d8d436 100644 (file)
@@ -278,9 +278,10 @@ xprof_Init(void)
 }
 
 void
-xprofRegisterWithCacheManager(CacheManager & manager)
+xprofRegisterWithCacheManager(void)
 {
-    manager.registerAction("cpu_profile", "CPU Profiling Stats", xprof_summary, 0, 1);
+    CacheManager::GetInstance()->
+         registerAction("cpu_profile", "CPU Profiling Stats", xprof_summary, 0, 1);
 }
 
 void
index ced3cdf17598dce37610b044488fb9fe7a0c7cbf..4dce408fac64ae1483661a21cfe972a425e9ac8d 100644 (file)
@@ -339,7 +339,7 @@ SQUIDCEXTERN StoreEntry *storeCreateEntry(const char *, const char *, request_fl
 SQUIDCEXTERN void storeInit(void);
 
 /// \ingroup StoreAPI
-extern void storeRegisterWithCacheManager(CacheManager & manager);
+extern void storeRegisterWithCacheManager(void);
 
 /// \ingroup StoreAPI
 SQUIDCEXTERN void storeConfigure(void);
index 2d218491674d993bde87a71962d775aaf825395c..ca452869661543606d17c833d68006a998686402 100644 (file)
@@ -1027,8 +1027,8 @@ mainInitialize(void)
         statRegisterWithCacheManager();
         storeDigestRegisterWithCacheManager();
         StoreFileSystem::RegisterAllFsWithCacheManager(*manager);
-        storeRegisterWithCacheManager(*manager);
-        storeLogRegisterWithCacheManager(*manager);
+        storeRegisterWithCacheManager();
+        storeLogRegisterWithCacheManager();
 #if DEBUGSTRINGS
 
         StringRegistry::Instance().registerWithCacheManager();
@@ -1036,7 +1036,7 @@ mainInitialize(void)
 
 #if    USE_XPROF_STATS
 
-        xprofRegisterWithCacheManager(*manager);
+        xprofRegisterWithCacheManager();
 #endif
 
     }
index 2973fb0a2105d3c2b59232da0f94b2b2d60c5bf9..2d44db917dfba97877dbdc8ff7db13087f646319 100644 (file)
@@ -538,7 +538,7 @@ SQUIDCEXTERN void storeLog(int tag, const StoreEntry * e);
 SQUIDCEXTERN void storeLogRotate(void);
 SQUIDCEXTERN void storeLogClose(void);
 SQUIDCEXTERN void storeLogOpen(void);
-SQUIDCEXTERN void storeLogRegisterWithCacheManager(CacheManager &);
+SQUIDCEXTERN void storeLogRegisterWithCacheManager(void);
 
 
 /*
index 72fcc92cd1dea4d6f861e1cb96a1a8c4613f8348..f22c4cba504fa8b679891a3abcd9e6c1c196ec6c 100644 (file)
@@ -1400,17 +1400,13 @@ storeInit(void)
 }
 
 void
-storeRegisterWithCacheManager(CacheManager & manager)
+storeRegisterWithCacheManager(void)
 {
-    manager.registerAction("storedir",
-                           "Store Directory Stats",
-                           Store::Stats, 0, 1);
-    manager.registerAction("store_check_cachable_stats",
-                           "storeCheckCachable() Stats",
+    CacheManager *manager=CacheManager::GetInstance();
+    manager->registerAction("storedir", "Store Directory Stats", Store::Stats, 0, 1);
+    manager->registerAction("store_io", "Store IO Interface Stats", storeIOStats, 0, 1);
+    manager->registerAction("store_check_cachable_stats", "storeCheckCachable() Stats",
                            storeCheckCachableStats, 0, 1);
-    manager.registerAction("store_io",
-                           "Store IO Interface Stats",
-                           storeIOStats, 0, 1);
 }
 
 void
index dfa95feeb0368c0a463c85eabfe1736c6d2d3300..e370ed659bdc0f317862eb2dde0d45fc8898a1f5 100644 (file)
@@ -136,11 +136,11 @@ storeLogOpen(void)
 }
 
 void
-storeLogRegisterWithCacheManager(CacheManager & manager)
+storeLogRegisterWithCacheManager(void)
 {
-    manager.registerAction("store_log_tags",
-       "Histogram of store.log tags",
-       storeLogTagsHist, 0, 1);
+    CacheManager::GetInstance()->
+        registerAction("store_log_tags", "Histogram of store.log tags",
+                       storeLogTagsHist, 0, 1);
 }
 
 void