java left logo
java middle logo
java right logo
 

Home arrow Java Applications
 
 
Main Menu
Home
Java Tutorials
Book Reviews
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Java Network
Java Forums
Java Blog




Most Visited Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews
Top Rated Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews


Statistics
Registered Users: 3946
Java SE Tips: 614
Java ME Tips: 202
Java EE Tips: 183
Other API Tips: 779
Java Applications: 298
Java Libraries: 209
Java Games: 16
Book Reviews:
 
 
 
Cougaar Memory Profiler E-mail
User Rating: / 3
PoorBest 

The Cougaar memory profiler is a tool for debugging memory usage and leaks in any Java application. It features a scalable 100% Java design that is lighter weight than existing JVMPI-based profilers (hprof, OptimizeIt(tm), JProbe(tm), etc).

Memory leaks can arise in Java applications due to unintentional object references. For example, an application may fail to remove callback listeners or close streams, preventing these objects from being garbage collected. Even minor leaks can grow to major problems in deployed systems.

The profiler tracks memory usage within the application by using tables of WeakReferences. The developer selects which classes should be tracked and runs an automated classfile editor (using BCEL) to add profiling instructions to the constructors. The profiler maintains pointers to the live instances and can display useful debugging information:

  • Total number of allocations of a profiled class, including the number of live and GC'ed instances
  • Free/used/max VM heap size and force GC
  • Show instances in order of: allocation timestamp, compareTo, hashCode, toString, "size" (e.g. ArrayList.size() & String.length()), "capacity" (e.g. ArrayList.elementData.length). For example, find the largest HashMaps, ten newest "com.Foo", oldest "com.Foo", etc.
  • Count unique occurences of:allocation stacktrace, equals, toString, hashCode, allocation timestamp (& mod second/minute/hour), "size" (& mod 100/1000). For example, what's the most common allocation point for ArrayLists, which are the most common "equals" values (for potential caching), etc.
  • Sample instances for the above order/count views. For example, randomly select 100 of the 1000+ Strings and show the 10 most common "equals" values.
  • The profiler can be configured to randomly sample the allocations to further reduce runtime overhead on a per-class basis. For example, track 5% of allocated Strings. The UI will adjust the displayed data to match the sampling ratio(s).

An interactive servlet-based UI is included that displays all the above profiling data. A servlet-based UI was developed instead of a Swing UI since it matched the Cougaar Agent Architecture's embedded servlet server. It'd be straight-forward to port the servlet to Swing or create a JEditorPane/HTMLEditorKit adaptor. The servlet has minimal Cougaar dependencies and can be modified to run in any servlet server.

URL: http://profiler.cougaar.org/
Licence: Proprietary


 Related Tips

 
< Prev   Next >

Page 1 of 0 ( 0 comments )

You can share your information about this topic using the form below!

Please do not post your questions with this form! Thanks.


Name (required)


E-Mail (required)

Your email will not be displayed on the site - only to our administrator
Homepage(optional)



Comment Enable HTML code : Yes No



 
       
         
     
 
 
 
   
 
 
java bottom left
java bottom middle
java bottom right
RSS 0.91 FeedRSS 1.0 FeedRSS 2.0 FeedATOM FeedOPML Feed

Home - About Us - Privacy Policy
Copyright 2005 - 2008 www.java-tips.org
Java is a trademark of Sun Microsystems, Inc.