diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2009-04-28 13:47:42 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2009-04-28 13:47:42 -0230 |
commit | 1e6317134c769a333c2d653d18c444b7f03c7249 (patch) | |
tree | aa590e61b6846bc6cf30e6ffd3b50881c0faddf0 /java | |
parent | Bug 3482 - deprecate generateUUID in C# (diff) | |
download | ice-1e6317134c769a333c2d653d18c444b7f03c7249.tar.bz2 ice-1e6317134c769a333c2d653d18c444b7f03c7249.tar.xz ice-1e6317134c769a333c2d653d18c444b7f03c7249.zip |
Bug 2558 - thread pool tracing
Diffstat (limited to 'java')
-rw-r--r-- | java/src/IceInternal/PropertyNames.java | 3 | ||||
-rw-r--r-- | java/src/IceInternal/ThreadPool.java | 20 | ||||
-rw-r--r-- | java/src/IceInternal/TraceLevels.java | 4 |
3 files changed, 26 insertions, 1 deletions
diff --git a/java/src/IceInternal/PropertyNames.java b/java/src/IceInternal/PropertyNames.java index 4110932c4a1..edc5c5a5e11 100644 --- a/java/src/IceInternal/PropertyNames.java +++ b/java/src/IceInternal/PropertyNames.java @@ -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! @@ -111,6 +111,7 @@ public final class PropertyNames new Property("Ice\\.Trace\\.Protocol", false, null), new Property("Ice\\.Trace\\.Retry", false, null), new Property("Ice\\.Trace\\.Slicing", false, null), + new Property("Ice\\.Trace\\.ThreadPool", false, null), new Property("Ice\\.UDP\\.RcvSize", false, null), new Property("Ice\\.UDP\\.SndSize", false, null), new Property("Ice\\.TCP\\.Backlog", false, null), diff --git a/java/src/IceInternal/ThreadPool.java b/java/src/IceInternal/ThreadPool.java index 4443892b0ab..6b6551806ad 100644 --- a/java/src/IceInternal/ThreadPool.java +++ b/java/src/IceInternal/ThreadPool.java @@ -84,6 +84,13 @@ public final class ThreadPool _size = size; _sizeMax = sizeMax; _sizeWarn = sizeWarn; + + if(_instance.traceLevels().threadPool >= 1) + { + String s = "creating " + _prefix + ": Size = " + _size + ", SizeMax = " + _sizeMax + ", SizeWarn = " + + _sizeWarn; + _instance.initializationData().logger.trace(_instance.traceLevels().threadPoolCat, s); + } try { @@ -240,6 +247,12 @@ public final class ThreadPool assert(_inUse <= _running); if(_inUse < _sizeMax && _inUse == _running) { + if(_instance.traceLevels().threadPool >= 1) + { + String s = "growing " + _prefix + ": Size = " + (_running + 1); + _instance.initializationData().logger.trace(_instance.traceLevels().threadPoolCat, s); + } + try { EventHandlerThread thread = new EventHandlerThread(_programNamePrefix + _prefix + "-" + @@ -684,6 +697,13 @@ public final class ThreadPool // if(load + 1 < _running) { + if(_instance.traceLevels().threadPool >= 1) + { + String s = "shrinking " + _prefix + ": Size = " + (_running - 1); + _instance.initializationData().logger.trace( + _instance.traceLevels().threadPoolCat, s); + } + assert(_inUse > 0); --_inUse; diff --git a/java/src/IceInternal/TraceLevels.java b/java/src/IceInternal/TraceLevels.java index 3e4ab9d8a4b..d817b0c53bd 100644 --- a/java/src/IceInternal/TraceLevels.java +++ b/java/src/IceInternal/TraceLevels.java @@ -18,6 +18,7 @@ public final class TraceLevels retryCat = "Retry"; locationCat = "Locator"; slicingCat = "Slicing"; + threadPoolCat = "ThreadPool"; final String keyBase = "Ice.Trace."; @@ -26,6 +27,7 @@ public final class TraceLevels retry = properties.getPropertyAsInt(keyBase + retryCat); location = properties.getPropertyAsInt(keyBase + locationCat); slicing = properties.getPropertyAsInt(keyBase + slicingCat); + threadPool = properties.getPropertyAsInt(keyBase + threadPoolCat); } final public int network; @@ -37,5 +39,7 @@ public final class TraceLevels final public int location; final public String locationCat; final public int slicing; + final public String threadPoolCat; + final public int threadPool; final public String slicingCat; } |