I already sent out a few e-mails on working on a concurrent logger and
possibility of performance gains using a different locking strategy.  I
have been trying to reconcile if my design change had any impact on
performance.  I felt that I wasn't measuring the impact of my changes
correctly.

Have any of you used OptimizeIt or JProbe (or any real code profiler) on
log4j 1.3?

I have spent some time working with the code on JBoss Profiler, and have
found some interesting things.  (No, you don't need JBoss, it's just the
name.)  I attached some example output.

Although, it's a bit rough around the edges, it gives accurate results
and has a pretty good interface.  If any of you would like assistance on
setting it up, I would be glad to help.

I know the log4j developers have worked hard on optimizing time and
memory, but I think some of the optimizations may have been
"premature."  In an effort to optimize some things, I think some of the
changes that worsen the overall cleanliness of the code base.

Processes executed from Sun Jan 23 17:42:07 UTC 2005 till Sun Jan 23 17:44:20 UTC 2005  
jboss-profiler save data consolidated view thread view process view jboss-profiler
Process View methods memory Process View
java.lang.Thread.run = 100% calls=15
 org.apache.log4j.concurrent.PerformanceTest.run %CPU=100 %Time=99.98 calls=15
  org.apache.log4j.Category.info %CPU=99.622 %Time=99.739 calls=684
   org.apache.log4j.Category.forcedLog %CPU=99.144 %Time=98.704 calls=684
    org.apache.log4j.spi.LoggingEvent. %CPU=37.25 %Time=30.655 calls=684
     org.apache.log4j.spi.ThrowableInformation. %CPU=36.906 %Time=30.373 calls=684
      org.apache.log4j.spi.ThrowableInformation.extractStringRep %CPU=34.036 %Time=28.384 calls=684
Callings Avg Callings % CPU % Time Name CPU Avg CPU Time Avg Time  
       684 45 14.773 10.866 java.lang.Throwable.printStackTrace(java.io.PrintWriter):void 17600000000 25730994 63484 92 Callers Stick Threads
       683 45 12.296 11.342 java.lang.Class.getMethods():java.lang.reflect.Method[] 14650000000 21449487 66267 97 Callers Stick Threads
       51828 3455 3.257 2.463 java.lang.String.equals(java.lang.Object):boolean 3880000000 74863 14391 0 Callers Stick Threads
       682 45 0.109 0.127 org.apache.log4j.helpers.PlatformInfo.isJDK14OrLater():boolean 130000000 190615 743 1 Callers Stick Threads
       2 0 0.092 0.027 java.lang.ClassLoader.loadClassInternal(java.lang.String):java.lang.Class 110000000 55000000 160 80 Callers Stick Threads
       683 45 0.017 0.013 java.lang.Object.getClass():java.lang.Class 20000000 29282 78 0 Callers Stick Threads
       1 0 0 0 org.apache.log4j.helpers.PlatformInfo.():void 0 0 1 1 Callers Stick Threads
       1 0 0 0.011 java.lang.ClassLoader.checkPackageAccess(java.lang.Class,java.security.ProtectionDomain):void 0 0 63 63 Callers Stick Threads

Critical Path Pie Chart Instances Created Instances Created + subMethods
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to