diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/Ice/PropertyNames.cpp | 3 | ||||
-rw-r--r-- | cpp/src/Ice/PropertyNames.h | 2 | ||||
-rw-r--r-- | cpp/src/Ice/ThreadPool.cpp | 21 | ||||
-rw-r--r-- | cpp/src/Ice/TraceLevels.cpp | 5 | ||||
-rw-r--r-- | cpp/src/Ice/TraceLevels.h | 3 |
5 files changed, 31 insertions, 3 deletions
diff --git a/cpp/src/Ice/PropertyNames.cpp b/cpp/src/Ice/PropertyNames.cpp index 3a20ddc4094..06cee824880 100644 --- a/cpp/src/Ice/PropertyNames.cpp +++ b/cpp/src/Ice/PropertyNames.cpp @@ -8,7 +8,7 @@ // ********************************************************************** // -// Generated by makeprops.py from file ../config/PropertyNames.xml, Fri Apr 3 11:02:17 2009 +// Generated by makeprops.py from file ../config/PropertyNames.xml, Tue Apr 28 13:06:23 2009 // IMPORTANT: Do not edit this file -- any edits made here will be lost! @@ -109,6 +109,7 @@ const IceInternal::Property IcePropsData[] = IceInternal::Property("Ice.Trace.Protocol", false, 0), IceInternal::Property("Ice.Trace.Retry", false, 0), IceInternal::Property("Ice.Trace.Slicing", false, 0), + IceInternal::Property("Ice.Trace.ThreadPool", false, 0), IceInternal::Property("Ice.UDP.RcvSize", false, 0), IceInternal::Property("Ice.UDP.SndSize", false, 0), IceInternal::Property("Ice.TCP.Backlog", false, 0), diff --git a/cpp/src/Ice/PropertyNames.h b/cpp/src/Ice/PropertyNames.h index 811de51ada7..0187e6e9e01 100644 --- a/cpp/src/Ice/PropertyNames.h +++ b/cpp/src/Ice/PropertyNames.h @@ -8,7 +8,7 @@ // ********************************************************************** // -// Generated by makeprops.py from file ../config/PropertyNames.xml, Fri Apr 3 11:02:17 2009 +// Generated by makeprops.py from file ../config/PropertyNames.xml, Tue Apr 28 13:06:23 2009 // IMPORTANT: Do not edit this file -- any edits made here will be lost! diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp index 11c08dc63a9..70bc4513bd4 100644 --- a/cpp/src/Ice/ThreadPool.cpp +++ b/cpp/src/Ice/ThreadPool.cpp @@ -18,6 +18,7 @@ #include <Ice/Protocol.h> #include <Ice/ObjectAdapterFactory.h> #include <Ice/Properties.h> +#include <Ice/TraceLevels.h> using namespace std; using namespace Ice; @@ -89,6 +90,13 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& p } const_cast<size_t&>(_stackSize) = static_cast<size_t>(stackSize); + if(_instance->traceLevels()->threadPool >= 1) + { + Trace out(_instance->initializationData().logger, _instance->traceLevels()->threadPoolCat); + out << "creating " << _prefix << ": Size = " << _size << ", SizeMax = " << _sizeMax << ", SizeWarn = " + << _sizeWarn; + } + __setNoDelete(true); try { @@ -246,6 +254,12 @@ IceInternal::ThreadPool::promoteFollower(EventHandler* handler) assert(_inUse <= _running); if(_inUse < _sizeMax && _inUse == _running) { + if(_instance->traceLevels()->threadPool >= 1) + { + Trace out(_instance->initializationData().logger, _instance->traceLevels()->threadPoolCat); + out << "growing " << _prefix << ": Size = " << (_running + 1); + } + try { IceUtil::ThreadPtr thread = new EventHandlerThread(this); @@ -615,6 +629,13 @@ IceInternal::ThreadPool::run() // if(load + 1 < _running) { + if(_instance->traceLevels()->threadPool >= 1) + { + Trace out(_instance->initializationData().logger, + _instance->traceLevels()->threadPoolCat); + out << "shrinking " << _prefix << ": Size = " << (_running - 1); + } + assert(_inUse > 0); --_inUse; diff --git a/cpp/src/Ice/TraceLevels.cpp b/cpp/src/Ice/TraceLevels.cpp index 507d7a19b9d..d46654a98a4 100644 --- a/cpp/src/Ice/TraceLevels.cpp +++ b/cpp/src/Ice/TraceLevels.cpp @@ -28,7 +28,9 @@ IceInternal::TraceLevels::TraceLevels(const PropertiesPtr& properties) : slicing(0), slicingCat("Slicing"), gc(0), - gcCat("GC") + gcCat("GC"), + threadPool(0), + threadPoolCat("ThreadPool") { const string keyBase = "Ice.Trace."; const_cast<int&>(network) = properties->getPropertyAsInt(keyBase + networkCat); @@ -37,4 +39,5 @@ IceInternal::TraceLevels::TraceLevels(const PropertiesPtr& properties) : const_cast<int&>(location) = properties->getPropertyAsInt(keyBase + locationCat); const_cast<int&>(slicing) = properties->getPropertyAsInt(keyBase + slicingCat); const_cast<int&>(gc) = properties->getPropertyAsInt(keyBase + gcCat); + const_cast<int&>(threadPool) = properties->getPropertyAsInt(keyBase + threadPoolCat); } diff --git a/cpp/src/Ice/TraceLevels.h b/cpp/src/Ice/TraceLevels.h index cb497413ab1..1650d1340f4 100644 --- a/cpp/src/Ice/TraceLevels.h +++ b/cpp/src/Ice/TraceLevels.h @@ -40,6 +40,9 @@ public: const int gc; const char* gcCat; + + const int threadPool; + const char* threadPoolCat; }; } |